SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2003
    Location
    colombia
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    new on css - need some help w contextual

    hi.
    i'm new in this css world and i got a situation with contextual selectors, hope someone can help me out.

    i have a div with this css:

    .ami2 {
    padding: 5px 20px 10px 35px;
    font-size: 11px;
    color: #CCC;
    }

    and i want all the links inside that div in a particular color, but not affecting all the links in the site.
    i have some problems trying to understand the logic of contextual selectors.

    merci

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then you would want to do:
    Code:
    .ami2 a {
       color: #f90;
    }
    The space between ".ami2" and "a" means all <a> elements inside of a element whose class is ami2.
    ck :: bringing chris to the masses.


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
  •