SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <div> is not really inside it's container

    Hey,

    I'm having an isse where my nav <div> tag is not really sitting inside of the container tag.

    Basically i have the container tag setup to give a boarder on the left and right sides and to give the "work space" a background color. The nav box is sitting 1/2 in and 1/2 out of the container box on the lower left hand corner of the container box. The position of nav box is ok, i just need it to be 100% in the container box. Think of it like pulling the bottom line of the container box down so it's evan with the bottom of the nav box.

    here is my css.
    PHP Code:
    /* CSS Document */

    BODY
        
    {
        
    margin0px;
        
    padding0px;
        
    border0px;
        
    background-color:#999999;
        
    font-familygeorgiatimes"times new roman"serif;
        }
        
        
    #container
        
    {
        
    margin1em 5%;
        
    background-color:#FFFFFF;
        
    border1px solid #000000;
        
    min-width:800px;
        }
        
        
    #banner
        
    {
        
    height:100px;
        
    background-color:#0099FF;
        
    border-bottom1px solid #333;
        
    }


    #nav
        
    {
         
    floatleft;
        
    width160px;
        
    margin-left10px;
        
    padding-top1em;
        }
        

    #nav p
        
    {
        
    margin-top0;
        }
        

    #content
        
    {
        
    padding-top1em;
        
    margin0 2em 0 200px;
        }
        
     
    #nav-menu ul
        
    {
        list-
    stylenone;
        
    padding0;
        
    margin0;
        }
        

    #nav-menu li a
        
    {
        
    background-color:#0099FF;
        
    padding2px 5px 3px 5px;
        
    height1em;
        
    line-height1em;
        
    floatleft;
        
    width7em;
        
    displayblock;
        
    border0.1em solid #dcdce9;
        
    color:#FFFFFF;
        
    text-decorationnone;
        
    text-aligncenter;
        }    
        
        
     
    /* Hide from IE5-Mac \*/
    #nav-menu li a
        
    {
        
    floatnone
        
    }
    /* End hide */ 
    here is my html
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <!-- 
    DW6 -->
    <
    head>
    <!-- 
    Copyright 2005 MacromediaIncAll rights reserved. -->
    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <
    title>-Night LancePersonals.</title>

    <
    link href="http://personals.nightlance.com/css/personals.css" rel="stylesheet" type="text/css" />

    </
    head>

    <
    body>
    <
    div id="container">

       <
    div id="banner">
          
    Site name
       
    </div><!--end of <div id="banner">-->
       
       
       
       <
    div id="nav">
           <
    div id="nav-menu">
                   <
    ul>
                    <
    li><a href="#">Home</a></li>
                    <
    li><a href="#">Singup</a></li>
                    <
    li><a href="#">Login</a></li>
                    <
    li><a href="#">Help</a></li>
                    <
    li><a href="#">Contact us</a></li>
                </
    ul>
           </
    div><!--end of <div id="nav-menu">-->
       </
    div><!--end of <div id="nav">-->
       
       
       
       <
    div id="content">
          <
    h2>page shizzle here!</h2>
       </
    div><!--end of <div id="content">-->
       
       
       
    </
    div><!--end of <div id="container">-->
    </
    body>
    </
    html

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that worked. thanks

  3. #3
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by all4nerds
    *+html .fc{zoom:1;}
    Off Topic:


    IE7 hack?

  4. #4
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hey,

    Thanks dude. Yeah, I've been a little worried IE7 myself. Can't do any local testing (no SP2) and ieCapture doesn't exactly give me 'the whole picture'.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •