Web Analytics Made Easy -
StatCounter css ul not displaying in line ... - CodingForum

Announcement

Collapse
No announcement yet.

css ul not displaying in line ...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • css ul not displaying in line ...

    Hello everyone,

    I got an unsorted list and on the css i have the display set to up "inline", but when listing, instead of actually list it in line, is listing as if it was on a diferent line...


    this is on the html:

    Code:
    <div id="navwrapper">
    <ul class="nav">
    				<li>Previous</li>
    		<li class="home"><a href="home">Refresh page</a></li>
    				<li class="next"><a href='/page22/'>Next  &raquo;</a></li>
    	</ul>
    </div>
    and this is the css:

    Code:
    	#navwrapper{ width:850px; height:20px; margin-top:3px; }
    	ul.nav {margin: 0; padding:0; font-size:12px; display:inline; list-style-type:none;}
    	ul.nav li {margin: 0; padding: 0 0 8px;}
    	ul.nav li.next {text-align: right;}
    	ul.nav li.home {text-align: center;}
    I tried to add a "display:inline;" to the "#navwrapper" , but didnt work =\


    What am i missing thats still not displaying it as if it was on the same line. ?

  • #2
    I'm really not a pro but try this :

    #navwrapper {
    width:850px;
    height:20px;
    margin-top:3px;
    ul.nav {margin: 0; padding:0; font-size:12px; display:inline; list-style-type:none;}
    ul.nav li {margin: 0; padding: 0 0 8px;}
    ul.nav li.next {text-align: right;}
    ul.nav li.home {text-align: center;}
    }

    Comment


    • #3
      inline is not the same thing as horizontal... Since you mentioned navigation I assume you are trying to make a horizontal nav bar... try this CSS code...

      Code:
      #navwrapper ul li
      {
      list-style:none;
      float:left;
      }
      
      .....
      then in your HTML
      
      <div id="navwrapper">
        <ul>
          <li>Home</li>
          <li>About</li>
          <li>Contact</li>
        </ul>
      </div>

      I code C hash-tag .Net
      Reference: W3C W3CWiki .Net Lib
      Validate: html CSS
      Debug: Chrome FireFox IE

      Comment


      • #4
        i actually made a few changes and tested it if neither of these solutions work let me know.
        .pLeAd InSaNiTy.

        Comment

        Working...
        X