03-15-2004, 12:39 AM
in html how do you stretch a backround instead of tiling it?
backround
|
03-15-2004, 12:39 AM
in html how do you stretch a backround instead of tiling it?
03-15-2004, 12:51 AM
Look around for some CSS tutorials...
03-15-2004, 02:19 AM
Don't listen to 'em... There isnt a CSS setting but it can easily be done. If this is a main background, simply do this:
<html> <body style="margin:0px"> <img src="anyimage.gif" style="width:100%; height:100%"> <div style="position:absolute; left:0; top:0; width:100%; height: 100%"> MAIN SITE CONTENT </div> </body> </html> You can set the width and height of an image, so you can just use layering to place the site over the background image.
03-16-2004, 06:37 PM
Too bad it gets stretched. If you want to have good quality, always, you could check for the screenmode (Screen.Width, Screen.Height) first, and then load a specific background image.
03-16-2004, 08:23 PM
Quote:There isnt a CSS setting but it can easily be done. If this is a main background, simply do this: There isn't? I was told that the only way to do so was through CSS. Hmm... oh well. Ignore me then...
03-16-2004, 08:44 PM
...and if they have javascript turned off, neo? There's a surprising number of people doing so. And most people do not maximize their browser window.
Rockuman, CSS backgrounds are pretty nifty, especially in the case of rollovers. But background-width and background-height are not options for some reason. *shrug* The best option is to find out what parts of your design are meant to stretch, and give them a solid color a background that can seamlessly tile.
03-17-2004, 01:39 AM
Stretching images is bad form anyway... much better to tile an image, or simply place an image and don't repeat it...
Neat CSS trick: Code: body { Looks neat in moz firebird
03-18-2004, 12:47 AM
Code: background-attachment: fixed; Code: bgproperties=fixed
I'd knock on wood, but my desk is particle board.
03-18-2004, 08:26 AM
... but guess which one's gonna last longer
03-18-2004, 11:40 PM
Yeah, CSS and the DOM are the best things that ever happened to HTML. But I wish they'd let you use math for CSS values. Something like this could be extraordinarily cool:
Code: div#myblock { While stuff like that is possible without math, it'd be sooo much easier with. They made a protocol once for it, but it died in whatever subcomittee they have. |
« Next Oldest | Next Newest »
|