Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    1
    Member #
    40173

    why is my navigational bar not horizontal?

    Screen shot 2014-09-16 at 5.08.15 PM.jpg


    I have attached the relevant html and css below. please can you help me. i just want the navigational items to be horizontal.



    HTML :

    <div id="home">
    <nav>
    <ul>
    <li> <a href="#sectionOne"> ILLUSTRATION </br> </br> </a> </li>
    <li> <a href="#sectionTwo"> PHOTOGRAPHY </br> </br> </a> </li>
    <li> <a href="doc2.html"> DIGITAL </a> </li>
    </ul>
    </nav>


    <div id="heading">
    <h1> EMMA COUTTS </h1>

    </div>
    </div>




    CSS:


    #home {
    width:100%;
    height: 50px;
    background:#FFFFFF;
    text-align: center;
    }


    #sectionOne {
    width:100%;
    height:300px;
    background:#FFFEEE;
    }



    #sectionTwo {
    width:100%;
    height:750px;
    background:#FFFFFF;
    }


    nav {
    text-align: center;
    width: 800 px;
    height: 30px;
    margin: auto;
    background: EOEOEO;
    }


    ul {
    list-style: none;
    width: 100%;
    margin: 0;
    padding-top: 5px;
    background: EOEOEO;
    }

    li {
    float: ;
    padding: 0px auto;
    background: EOEOEO;
    }

  2.  

  3. #2
    Senior Member sasha_bolcina's Avatar
    Join Date
    Sep 2014
    Location
    Serbia
    Posts
    274
    Member #
    40099
    Liked
    47 times
    li {
    float: left;

  4. #3
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    You have line breaks (in red) in your list items - this will force the next item to a line below. Remove the line breaks. If you are trying to space the items, use CSS to do so by putting margins on them.
    Quote Originally Posted by emmalillian View Post

    HTML :

    <div id="home">
    <nav>
    <ul>
    <li> <a href="#sectionOne"> ILLUSTRATION </br> </br> </a> </li>
    <li> <a href="#sectionTwo"> PHOTOGRAPHY </br> </br> </a> </li>
    <li> <a href="doc2.html"> DIGITAL </a> </li>
    </ul>
    </nav>
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com