Stretch div background image |
Stretch div background image |
Stripes |
Sep 1 2011, 02:54 PM
Post
#1
|
Newbie Group: Members Posts: 15 Joined: 11-September 10 Member No.: 12,708 |
Hey guys, I'm designing a new website and I'd like to know if it's a good choice to have one rather large image (900w 700h) to be the background of the main content layer, and if so...I'd like to have it stretch out with the content, the length-wise way. So this would mean when I write content and have it run down on spaces, the background will stretch with the div layer that has the text in it.
|
Stripes |
Sep 4 2011, 02:11 PM
Post
#2
|
Newbie Group: Members Posts: 15 Joined: 11-September 10 Member No.: 12,708 |
Finished my template design, except for the right div layer. Code is below image.
My index.html CODE <head> <title>Nic's PC Services</title> <link href="css/Style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-color: #1E3349; } </style> </head> <body> <div id="wrapper"> <div id="content"> <div id="header"><img src="images/header.gif" width="800" height="95" /></div> <div id="navbar"><img src="images/navbar_holder.png" width="800" height="25" /></div> <div id="contentarea"> <div id="left"><iframe src="docs/l1block.html" frameborder="0" scrolling="auto" height="340" width="580"></iframe></div> <div id="right">Right</div> <div id="leftspace"></div> <div id="left2"><iframe src="docs/l2block.html" frameborder="0" scrolling="auto" height="340" width="580"></iframe></div> </div> <div id="footer"> <center><iframe src="docs/footer.html" frameborder="0" scrolling="no" width="780px"></iframe></center> </div> </div> </div> </body> </html> My CSS Sheet CODE @charset "utf-8"; /* CSS Document */ * { margin: 0px; padding: 0px; } #wrapper { height: 100%; width: 80%; margin-right: auto; margin-left: auto; } #wrapper #content { height: 100%; width: 100%; margin-top: 0px; padding-top: 0px; } #contentarea { height: 700px; background-image: url(../images/content_bg.png); background-repeat: no-repeat; padding: 10px; } #wrapper #content #contentarea #left { float: left; width: 588px; background-image: url(../images/left_bg.png); background-repeat: no-repeat; height: 348px; } #wrapper #content #contentarea #leftspace { float: left; width: 588px; height: 8px; /* [disabled]clear: both; */ } #wrapper #content #contentarea #left2 { float: left; width: 588px; background-image: url(../images/left_bg.png); background-repeat: no-repeat; height: 348px; } #wrapper #content #contentarea #right { float: right; width: 192px; } #footer { clear: both; background-image: url(../images/footer.png); background-repeat: no-repeat; height: 80px; padding: 10px; width: 100%; } #header { } #navbar { } |
Lo-Fi Version | Time is now: 27th April 2024 - 03:38 PM |