SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict lundberg's Avatar
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    List-style images problem.

    Hello, I'm having some problems with the list-style option. I have these two rules in my css:
    Code:
    ul {
       padding: 0;
       margin: 0 10px 10px 15px;
       list-style: none;
    }
    ul .pil {
       list-style: disc url(../gfx/list_icon.gif);
       margin-left: 30px;
    }
    I want a the image to show only if I write <ul class="pil">. The thing is that it never shows. Any ideas?

    Thanks in advance

    Martin Lundberg
    Sweden

  2. #2
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Belgium
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it's ul.pil (without the space)
    and otherwise remove the ul keeping

    .pil {
    list-style: disc url(../gfx/list_icon.gif);
    margin-left: 30px;
    }

    and then use <ul class="pil"> in your html.

    another posibility wich I think is better is to define the list option to your <li> as folowing:

    ul.pil li {
    list-style: disc url(../gfx/list_icon.gif);
    }

    you still apply the class pil to <ul>

  3. #3
    SitePoint Addict lundberg's Avatar
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks ul.pil did work =) wounder my I didn't try that before asking ;P

    Martin Lundberg
    Sweden


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
  •