SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2007
    0 Post(s)
    0 Thread(s)

    TOTALLY Confused, CSS, HREF


    You see the links down the right hand side in the white box, for some reason the style of those links seems to be applying to the text in the main content box.

    How do I tell the site to display links down the left using a certain style, links in main content area use another style, footer links use a third style, and on and on.

    I know its something to do with class and id's but I'm not sure.

    Any help?

    Thanks =)

  2. #2
    SitePoint Zealot c.t.c.'s Avatar
    Join Date
    Apr 2007
    0 Post(s)
    0 Thread(s)
    I just loaded the page in FF3 on Linux and each section did already have its own unique link styles.

    To do this in general though, give the containing element of each section an id in your HTML. Then in CSS, use decendant selectors to target the elements withing the id. For example, if your header has an id of "header" and your footer has an id of "footer", you can style links differently in each section using "#header a" and "#footer a".

    Also, I noticed you're using an XHTML doctype. In that case, all your CSS rules should be written in lowercase.


Posting Permissions

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