Positioning, Overlap, and greater than 100% height/width

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Christopera
    New Member
    • Feb 2007
    • 70

    Positioning, Overlap, and greater than 100% height/width

    Hello,

    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:

    Code:
    <!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>
    Here is my CSS:

    Code:
    #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; }
    I don't believe you can see the verticle error on my live test site but this is only becuase i haven't added content.

    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
  • Christopera
    New Member
    • Feb 2007
    • 70

    #2
    I hope all of the geniuses around are just struggling too, otherwise nobody cares.

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      You may need to reposition the div in the markup to do what you want. Using 'absolute' is causing the div to collapse as it should.

      Comment

      • Christopera
        New Member
        • Feb 2007
        • 70

        #4
        Which div? I have tried various combinations but may have not found the right combination.

        Comment

        • Christopera
          New Member
          • Feb 2007
          • 70

          #5
          Well i did a complete code rewrite. I was able to achieve a the same exact look but removed all of the erros I discussed in this post.

          I will post a link and the follow up code once I transfer all of the information over to the new code base.

          Comment

          Working...