1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development firefox css problem

Discussion in 'Software' started by logan, 20 Jul 2006.

  1. logan

    logan flashback!

    Joined:
    17 Aug 2002
    Posts:
    873
    Likes Received:
    1
    I'm trying to get a fairly basic design working and I've got an issue with my menu.

    url: http://logan.uk.net/newlayout.php
    css: http://logan.uk.net/css/new2.css

    (Ignore the colours - they're just bright so I can see where everything sits)

    Renders fine in IE 6.0, but not in firefox.

    The background to the menu (bright green) should fill the gap between "item 4" and "login".

    Any ideas appreciated! :thumb:
     
  2. will.

    will. A motorbike of jealousy!

    Joined:
    2 Mar 2005
    Posts:
    4,461
    Likes Received:
    20
    Code:
    <body>
    <div id = pagewrapper>
    	<div id = contentwrapper>
    
      		
    	<img src="layout/headers/header13.jpg" width="750" height="150" border="0" id=header>
    	<div id=nav>
    <ul id=navigation>
            <li class=left><a href="#">item 1</a></li>
            <li class=left><a href="#">item 2</a></li><li class=left><a href="#">item 3</a></li>
          <li class=left><a href="#">item 4</a></li>
          <li class=right><a href="#">login</a></li>
    <br class="clear" />
    </ul>
    
    	  </div>
    	  <div id=content>
    		
          <p>content </p>
          <p>test test</p>
        </div>
    	</div>
    </div>
    </body>
    Code:
    <br class="clear" />
    Add that ^^ Into the html before the </ul>

    and add this to your css:
    Code:
    .clear
    {
         clear:both;
    }

    VOILA!

    edit: Just noticed, that you havn't given your <ul> a height, this would also solve it.

    edit again: clean up your css, remove everything your not using and always format it the same way. Its a lot easier to read. Also, I would avoid floating things right as a rule... I dunnow, but its my rule anyway, seeing as its fixed width you could just give it a margin-left:
     
    Last edited: 20 Jul 2006
  3. logan

    logan flashback!

    Joined:
    17 Aug 2002
    Posts:
    873
    Likes Received:
    1
    Cheers, went for setting the height of the ul property - the <br> statement seemed to cause an extra blank line in IE.

    Good advice on the keeping the css clean (helps loading times if nothing else!) - just messing around with some options but I'm such a lazy coder at the moment ;)

    Keeping the float right until i've decided if I'm keeping it fixed width or not, depends how the content looks.

    Thanks again for the help - and for being so quick too! :thumb:
     
  4. will.

    will. A motorbike of jealousy!

    Joined:
    2 Mar 2005
    Posts:
    4,461
    Likes Received:
    20
    tis ok.
     

Share This Page