Make a DIV element the width of the page |
Make a DIV element the width of the page |
jeak |
Jun 20 2012, 09:09 AM
Post
#1
|
Group: Members Posts: 2 Joined: 20-June 12 Member No.: 17,294 |
I have a DIV element at the top of my page, and another beneath. I'd like the top DIV to always cover the entire width of the page, even if the browser window width is less than the width of the second DIV element. How would I do this? Sample of what I'm currently doing below.
<html> <body style="padding:0px; margin:0px;"> <div style="background-color:#123456; width:100%;">top</div> <div style="background-color:#654321"><IMG style="width:1000px; height:1000px;"></div> </body> </html> |
Lo-Fi Version | Time is now: 28th March 2024 - 08:39 AM |