I have built a site that uses two divs, one verticle, and one horizontal as graphic style for the ite. The problem I am having is that if the browser is resized very small the divs are then smaller than the website is wide. I have tried fixed positioning but then i get the dreaded overlap when the browser is smaller than the website. Absolute positioning gets rid of the overlap but then brings on the width issue. Is there a way to fix this or am I done for? I have tried everything I know.
Specifically I am referring to the hstripe and vstripe parts of the code.
Here is my code:
Expand|Select|Wrap|Line Numbers
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
- <title>Chris Livengood</title>
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
- <link rel="stylesheet" type="text/css" href="css/index.css"/>
- <link rel="stylesheet" type="text/css" href="css/links.css"/>
- <link rel="stylesheet" type="text/css" href="css/universal.css"/>
- </head>
- <body>
- <div id="hstripe"></div>
- <div id="main">
- <div id="vstripe"></div>
- <div id="header"></div>
- <div id="headerright"></div>
- <div id="body">
- <div id="menu">
- <?php require("phpext/menu.php"); ?>
- </div>
- </div>
- <div id="content">
- <div class="right">
- <img src="images/image1.jpg" alt="Chris Livengood" class="topphoto"/><br/>
- <img src="images/image2.jpg" alt="Chris Livengood" class="photo"/>
- </div>
- <h2>Chris Livengood's Racing Blog</h2>
- <?php require("blog/08_20_08_blog.php"); ?>
- <div id="clear"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
Expand|Select|Wrap|Line Numbers
- #hstripe {
- width: 100%;
- height: 55px;
- left: 0px;
- margin: 200px 0px 0px 0px;
- position: absolute;
- background: url("../images/hstreamer.gif") no-repeat left #ff0000; }
- #main {width: 780px;
- height: 100%;
- padding: 0px;
- margin: 0px auto 0px auto;
- border: 0px solid #ff0000;}
- #vstripe {
- padding-top: 2px;
- width: 30px;
- min-height: 700px;
- height: 200%;
- background-color: white;
- margin: 0px 0px 0px 160px;
- padding-right: 25px;
- position: absolute;
- top: 0px;
- display: inline;
- z-index: 1000;
- background-image: url("../images/streamer.gif");
- background-repeat: no-repeat; }
- #header {
- position: absolute;
- height: 200px;
- width: 160px;
- margin: 0px 55px 57px 0px;
- background-image: url("../images/header_left.jpg");}
- #headerright {
- float: right;
- height: 200px;
- width: 565px;
- border: 0px solid white;
- margin: 0px 0px 55px 215px;
- background-image: url("../images/header_right.jpg");}
- #menu {
- position: absolute;
- width: 160px;
- top: 260px;
- padding: 0px;
- margin: 0px 0px 0px 0px; }
- #sponsors {
- background-color: white;
- padding: 0px 2px 2px 2px;
- width: 152px;
- color: black; }
- #content {
- float: right;
- margin: 0px 5px 0px 0px;
- width: 555px;
- border: 0px solid white; }
- .right{
- max-width: 300px;
- padding: 0px 2px 2px 2px;
- color: black;
- float: right;
- background-color: white;
- margin: 7px -5px 7px 7px; }
- .topphoto {
- background-color: white;
- padding: 10px 10px 0px 10px; }
- .photo {
- background-color: white;
- padding: 10px 10px 10px 10px; }
- .clear {
- border: 0px solid white;
- clear: both;
- width: 100%;
- height: 1px; }
The Live test version can be found here: Click
The home page validates but I haven't check the rest of them resently. They all appear to display correctly excluding the error I have mentioned.
Thanks for your help,
Chris