pageoneresults
14-03-2002, 20:54/08:54PM
Good evening everyone! One of the neat little things I've learned here recently with CSS are the background properties of a page. You know how most of us would set up a tiling background, right? We'd probably make a graphic that was 2400px wide and 1 or 2 pixels tall. Or it might be the other way around.
No more of that stuff! Now, you just make your tile the true size it should be and you can control what it does on the page through one of the below properties.
repeat - The image is repeated both horizontally and vertically.
repeat-x - The image is repeated horizontally only.
repeat-y - The image is repeated vertically only.
no-repeat - The image is not repeated: only one copy of the image is drawn.
Your CSS might look like this...
body{
background-color:#ffffff;
background-repeat:repeat-y;
background-image:url('/images/lines-tile-160.jpg');
layer-background-image:url('/images/lines-tile-160.jpg');
}
To see this in action, check out Honour, Inc. (http://www.honourinc.com)
This line of code...
layer-background-image:url('/images/lines-tile-160.jpg');
is the NN4+ fix. For those of you who have been banging your heads on how to get the background images to fill the browser window 100%, this is the solution. Unfortunately it does not validate at the W3C but it does solve the background problem for now.
Hmmm, I think with all the latest CSS I've been building into the sites, I now have my <body> fat down below 10%. I wonder how much further I can go?! ;)
P.S. You know, after viewing the source code of the above page, I cannot find anything that I could possibly trim any further. Can you? Don't be dissin' my webbots either!
No more of that stuff! Now, you just make your tile the true size it should be and you can control what it does on the page through one of the below properties.
repeat - The image is repeated both horizontally and vertically.
repeat-x - The image is repeated horizontally only.
repeat-y - The image is repeated vertically only.
no-repeat - The image is not repeated: only one copy of the image is drawn.
Your CSS might look like this...
body{
background-color:#ffffff;
background-repeat:repeat-y;
background-image:url('/images/lines-tile-160.jpg');
layer-background-image:url('/images/lines-tile-160.jpg');
}
To see this in action, check out Honour, Inc. (http://www.honourinc.com)
This line of code...
layer-background-image:url('/images/lines-tile-160.jpg');
is the NN4+ fix. For those of you who have been banging your heads on how to get the background images to fill the browser window 100%, this is the solution. Unfortunately it does not validate at the W3C but it does solve the background problem for now.
Hmmm, I think with all the latest CSS I've been building into the sites, I now have my <body> fat down below 10%. I wonder how much further I can go?! ;)
P.S. You know, after viewing the source code of the above page, I cannot find anything that I could possibly trim any further. Can you? Don't be dissin' my webbots either!