Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    25
    Thanked 0 Times in 0 Posts

    I cant get my ul to display horizonatlly

    hey guys, i have my navbar
    and for some reason the ul wont display properly.

    i have this...

    HTML
    Code:
    <div id="header">
        	<ul id="nav_ul">
            	<li><a class="home" href="Home">&nbsp;</a></li>
                <li><a class="blog" href="blog">&nbsp;</a></li>
                <li><a class="work" href="work">&nbsp;</a></li>
            </ul>
        </div>
    CSS
    Code:
    #nav_ul{
    	list-style-type:none;
    	display:inline;
    	float:right;
    	margin-top:34px;
    }
    please help =)

  • #2
    Regular Coder Samhain13's Avatar
    Join Date
    Aug 2008
    Location
    Pilipinas
    Posts
    169
    Thanks
    4
    Thanked 18 Times in 18 Posts
    This should get you started:

    1. remove "display: inline" from #nav_ul.
    2. add this to your CSS:

    Code:
    #nav_ul li { display : inline ; }
    I am a Man of Truth. I am a Free Human Person. I am a Peacemaker.
    ** Independent Multimedia Artist in Pasig **

  • Users who have thanked Samhain13 for this post:

    johnish (11-01-2008)

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    25
    Thanked 0 Times in 0 Posts
    no change =(

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Code:
    #nav_ul li {
    	float:left; /* or right */
    }
    Add this to your CSS. The float:right in your #nav_ul refers to the <ul> itself, not the <li> inside of it.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • Users who have thanked gnomeontherun for this post:

    johnish (11-01-2008)

  • #5
    New Coder
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    25
    Thanked 0 Times in 0 Posts
    perfect, thankyou so much both of you


  •  

    Posting Permissions

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