www.webdeveloper.com
Results 1 to 3 of 3

Thread: :first-letter and links?

  1. #1
    Join Date
    May 2003
    Location
    Vancouver, WA
    Posts
    47

    :first-letter and links?

    Hey all, on my site I had h3:first-letter set but since my h3 elements are links, when I roll over them it defaults to my default "a:link" sizing and hover and all that. Is there anyways to make the :first-letter work with links?

  2. #2
    Join Date
    Jan 2004
    Location
    United Kingdom
    Posts
    610
    If i understand your query right.
    You could use the standard link class etc.
    I.e You would have something like this in your CSS. This is yet to be tested.

    Code:
    h3:first-letter a {
      color: #000;
    }
    
    h3:first-letter a:link, a:visited {
      color: #000;
    }
    
    h3:first-letter a:hover {
      color: #f90;
    }
    Best Wishes,
    David
    More of a journal than a blog.

    Truly great madness cannot be achieved without significant intelligence.
    GMail | Mezzoblue | 1976 Design | Zeldman | Justwatchthesky | Jon Hicks | Airbag | All In The Head

  3. #3
    Join Date
    Jan 2004
    Posts
    2,422
    Do you mean like in the following context?
    Code:
    <h3><a href="#">H3 link</a></h3>

    If so, then multiple pseudo-classes would be the way to go:
    Code:
    h3 a:link:first-letter{ ... }
    h3 a:visited:first-letter{ ... }h3 a:hover:first-letter{ ... }h3 a:active:first-letter{ ... }
    That should work...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles