CSS - Links in H2 Tag

Discussion in 'HTML' started by Simon Harris, Nov 6, 2006.

  1. Simon Harris

    Simon Harris Guest

    Hi,

    Hope this is thr right group for CSS related queries, I know the group name
    is alt.html, but I could not see a CSS specific group.

    I am trying to set link colours differently than the rest of my page when
    they are included in an H2 tag, mainly because my H3 tag has a background
    colour, but what I have now shows the links as they are else where, as
    defined by my a, a:visited and a:hover tags.

    Heres my CSS code...

    body {
    background-color : #FFFFCC;
    font: 8pt/10pt verdana;
    }

    a {
    font: 8pt/10pt verdana;
    font-weight : bold;
    color : #1E8D00;
    }

    a:visited {
    font: 8pt/10pt verdana;
    font-weight : bold;
    color : #1E8D00;
    }

    /* H2 */
    h2 {
    font: 12pt/14pt verdana;
    background-color : #66FF66;
    }

    h2 a {
    color: #000000;
    }

    h2 a:visited {
    color: #ff0000;
    }

    h2 a:hover {
    color: #000000;
    }

    My links within H2 tags are currently green - Not black as I would expect
    from my code.

    Any help/advice will be much appreciated.

    Thanks!
    Simon.

    --
    -
    * Please reply to group for the benefit of all
    * Found the answer to your own question? Post it!
    * Get a useful reply to one of your posts?...post an answer to another one
    * Search first, post later : http://www.google.co.uk/groups
    * Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!
    Simon Harris, Nov 6, 2006
    #1
    1. Advertising

  2. Simon Harris

    Els Guest

    Simon Harris wrote:

    > Hi,
    >
    > Hope this is thr right group for CSS related queries, I know the group name
    > is alt.html, but I could not see a CSS specific group.


    comp.infosystems.www.authoring.stylesheets

    > I am trying to set link colours differently than the rest of my page when
    > they are included in an H2 tag, mainly because my H3 tag has a background
    > colour, but what I have now shows the links as they are else where, as
    > defined by my a, a:visited and a:hover tags.
    >
    > Heres my CSS code...


    [snip code]

    > My links within H2 tags are currently green - Not black as I would expect
    > from my code.
    >
    > Any help/advice will be much appreciated.


    Any url showing the problem is much appreciated ;-)

    --
    Els http://locusmeus.com/
    accessible web design: http://locusoptimus.com/
    Els, Nov 6, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chumley the Walrus

    Style tag not effecting links in paging from datagrid

    Chumley the Walrus, Aug 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    353
    Chumley the Walrus
    Aug 4, 2004
  2. shruds
    Replies:
    1
    Views:
    759
    John C. Bollinger
    Jan 27, 2006
  3. www.westerncartooncards.ca

    Exchange Links < Western Cartoon Cards > Exchange Links

    www.westerncartooncards.ca, Jul 12, 2004, in forum: HTML
    Replies:
    2
    Views:
    1,221
    Toby Inkster
    Jul 12, 2004
  4. johkar
    Replies:
    22
    Views:
    283
    Lasse Reichstein Nielsen
    Jan 23, 2006
  5. Garrett Smith
    Replies:
    14
    Views:
    299
    David Mark
    May 26, 2009
Loading...

Share This Page