SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bullet list items not lining up

    Hi all,

    If you take a look at the menu to the left of this page, with the bulleted list, you'll probably notice that the list text isn't lining up properly with the bullets.

    Here is the relevant CSS:

    Code:
    #left ul {
     margin: 2px;
     padding: 20px;
     list-style-image: url('bullet.gif');
    }
    #left ul li {
     padding: 0;
     margin: 0;
    }
    #left ul li a {
     font-family: Verdana;
     color: #000;
     font-size: 0.7em;
     padding: 0;
     margin: 0;
    }
    and the HTML:

    HTML Code:
    <ul>
    <li><a href="#" title="Home">Home</a></li>
    <li><a href="#" title="Home">Announcements</a></li>
    <li><a href="#" title="Home">Articles</a></li>
    <li><a href="#" title="Home">Help</a></li>
    </ul>
    Any idea why it's doing this? Any help would be much appreciated

    -Sam
    Sam Hastings

  2. #2
    011521 dbalsdon's Avatar
    Join Date
    Feb 2003
    Location
    North Of Scotland
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problems with Opera and IE6... right???
    Daniel Balsdon
    My Site

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,288
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Someone probably knows the real answer to this but you can line it up in IE6 with this code.
    Code:
    #left ul li a {
     font-family: Verdana;
     color: #000;
     font-size: 0.7em;
     padding: 0;
     margin: 0;
     vertical-align:top;
    }
    html>body #left ul li a {
    vertical-align:middle;
    }
    It was ok in Mozilla anyway which is why I included the html>body etc.

    (I'm sure there's an easier solution that I've missed.)

    Paul


Bookmarks

Posting Permissions

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