#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Issue with list in HTML and CSS


    Hoping someone can help me out. This seem pretty simple but I am having the hardest time. I am trying to create a horizontal list and need to use the nav and class attributes and this is what I have so far:

    In my HTML file:
    <nav>
    <ul class="horizontallist">
    <li><a href="#">Home</a></li>
    <li><a href="#">Courses</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Terms of Use</a></li>
    <li><a href="#">Feedback</a></li>
    <li><a href="#">Help</a></li>
    </ul>
    </nav>

    In my CSS file:
    .horizontallist li {
    display: inline;
    font-family: 'Century Gothic MS', sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 3px;
    line-height: 20px;
    text-decoration: none;
    }

    For some reason my text-decoration will not remove the underlines from the links on the HTML page. Any suggestions would be great. Thank you,

    Jason
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    862
    Rep Power
    275
    the text-decoration [underline] is actually on the <a> tags, not on the <li> tag.
    also, if you are wanting to remove the "bullets" from each of the list items, you would use "list-style-type: none;" on that .horizontallist li{} CSS.

IMN logo majestic logo threadwatch logo seochat tools logo