SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    m
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how can I define P style in a certain selector?

    Hi,

    I applied a css selector for a DIV tag, for a group of links, and I want the space between the lines of the links to be 0, and split them manually with the P tag,

    here is my code for example:

    Code:
    <div id="links">
    <p><a href="bla.html">bla</a> <a href="bla2.html">bla2</a></p>
    <p><a href="bla3.html">bla3</a></p>
    </div>
    and this is my css:

    Code:
    #bottom-links { font-size: 12px; text-align: center ; margin-top: 0px; margin-bottom: 0px}
    #bottom-links a { font-size: 12px; text-align: center ; margin-top: 0px; margin-bottom: 0px}
    but it doesn't work... there is a regular P space between each line...

    what can I do?

    Thanks!

  2. #2
    SitePoint Zealot 19nine78's Avatar
    Join Date
    Feb 2002
    Location
    Ayr, scotland
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the ID on your div is 'links' but in your stylesheet its 'bottom-links'

    Also hyphens in css selector names can cause problems in some browsers, so that may be it assuming the above was just a forum typo

    cheers

    alastair

  3. #3
    SitePoint Zealot 19nine78's Avatar
    Join Date
    Feb 2002
    Location
    Ayr, scotland
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, it should be

    #bottom-links p { font-size: 12px; text-align: center ; margin-top: 0px; margin-bottom: 0px}

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    m
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking thanks

    yes it was a forum typo

    Also, it should be

    #bottom-links p { font-size: 12px; text-align: center ; margin-top: 0px; margin-bottom: 0px}
    that's the solution, thanks!


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
  •