need help in css

Discussion in 'HTML & Website Design' started by phoenixart, Oct 6, 2009.

  1. #1
    hi mates ,
    i need a little help with my header
    how can i fix my navigation bar div
    when i change my resolution of my screen it floats with the screen in IE
    so what can i do to fix it .

    i already included a separate IE.css file with the html coding

    regards,
    phnx
     
    phoenixart, Oct 6, 2009 IP
  2. MhW

    MhW Active Member

    Messages:
    370
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Do you have a live demo you could show us?

    If not, at least the source code with CSS. :)
     
    MhW, Oct 6, 2009 IP
  3. phoenixart

    phoenixart Active Member

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #3

    here's the css html code :

    <div id="header"><!--header-->
    <div id="logo"><!--logo-->
    </div>
    <br clear="all" />
    <div id="wrapper">
    <div id="hh_lt"><!--hh_lt-->
    </div>
    <div id="hh_rt">
    </div>
    </div>
    </div>
    <br clear="all" />

    <div id="nav">
    <ul>
    <li id="current"><a href="#">Home</a></li>
    <li ><a href="services.html">Services</a></li>
    <li ><a href="#">About us</a></li>
    <li><a href="#">Full Package</a></li>
    <li><a href="hosting.html">Hosting</a></li>
    <li><a href="contact.html">Contact</a></li>
    <li><a href="#">Advertisement</a></li>
    </ul>
    </div>


    and the css code:

    #header{ height:175px; background:url(images/header_bg.jpg) repeat-x; }
    #logo{ width:362px; height:75px; background:url(images/logo.jpg); float:left; margin:20px 0 0 30px;}

    #wrapper{width:878px; margin:auto; padding:0px;}
    #hh_lt{width:29px; height:155px; background:url(images/lt_09.jpg) no-repeat ; float:left; margin-top:30px;}

    #hh_rt{width:849px; height:155px; background:url(images/rt.jpg) no-repeat; float:right;margin-top:30px;}

    #nav {float:left; font-size:12px; font-family:"Myriad Pro"; text-decoration:none;color:#7b7777; width:980px;margin:0; padding:0px;}

    #nav ul {padding:0; list-style:none; color:#7b7777;float:left; margin:0 0 0 110px; width:700px;}
    #nav li {color:#7b7777; float:left; background:url(images/mnu_rt.png) no-repeat;margin:auto;padding:10px 0 0 0; border:0px; text-decoration:none; height:28px;}
    #nav a {display:block; background:url(images/mnu_lt.png) no-repeat ; padding:0 20px 0 20px;text-decoration:none; color:#7b7777;}
    #nav #current {background-image:url(images/currentmnu_rt.png); color:#7b7777;}
    #nav #current a {background-image:url(images/currentmnu_lt.png); color:#fff;}
     
    phoenixart, Oct 6, 2009 IP
  4. calviin

    calviin Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Your navigation should be inside #wrapper
    OR

    change the CSS of #nav to margin: 0 auto; and remove float: left;
     
    calviin, Oct 6, 2009 IP