www.webdeveloper.com
Results 1 to 5 of 5

Thread: having some trouble

  1. #1
    Join Date
    Feb 2005
    Location
    Middle Village, NY
    Posts
    203

    having some trouble

    hey guys, was just wondering. when building a navigation, what would be the best way to build it. i tried it 3 ways and the all came out the same except when i used the unordered list <ul>.

    <div class="lftNAV">
    <div class="navTBL">
    <table>
    <tr>
    <td>navigation</td>
    </tr>
    <tr>
    <td>example</td>
    </tr>
    <tr>
    <td>example</td>
    </tr>
    </table>
    </div>
    </div>

    ----------------------------------------------------------------

    <div class="lftNAV">
    <div class="navSECTION">
    <div class="noSELECTS">
    <div class="SELECTS">example</div>
    <div class="SELECTS">example</div>
    <div class="SELECTS">example</div>
    <div class="SELECTS">example</div>
    </div>
    </div>
    </div>

    ----------------------------------------------------------------

    <div class="lftNAV">
    <div class="navSECTION">
    <ul>
    <li>example</li><br>
    <li>example</li><br>
    <li>example</li><br>
    <li>example</li><br>
    </ul>
    <div>
    <div>

    this one puts a bull as u know, but it also gives it a top gap between each one, how do i overwrite the default setting, cause i tried this in my sheet:
    li{
    padding:0;
    margin:0;
    }
    it worked when i used it for <ul> but not <li>.

    so can some one help me out on which way to go is better, or does someone have a different appraoch?

    thnks
    -keko-

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>Basic list</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
    <!--
    * {margin:0; padding:0;}
    li a {display:block; width:5em; background:gray;} 
    li a:hover {background:red;} 
    -->
    </style>
    
    </head>
    <body>
    <div class="lftNAV">
        <div class="navSECTION">
            <ul>
                <li><a href="#">example</a></li>
                <li><a href="#">example</a></li>
                <li><a href="#">example</a></li>
                <li><a href="#">example</a></li>
            </ul>
        <div>
    <div>
    </body>
    </html>
    Last edited by Fang; 04-14-2005 at 09:28 AM.

  3. #3
    Join Date
    Feb 2005
    Location
    Middle Village, NY
    Posts
    203
    thnks,

    whats with the em, why not px

  4. #4
    Join Date
    Feb 2005
    Location
    Middle Village, NY
    Posts
    203
    and the *

  5. #5
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Relative units are preferable for screen values: http://www.w3.org/QA/Tips/font-size
    "*" universal selector matches all elements: http://www.w3.org/TR/REC-CSS2/select...ersal-selector

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles