1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

H1 css not working in FF and netscape

Discussion in 'CSS' started by ian_ok, Mar 16, 2005.

  1. #1
    For some reason my H1 tag is now no longer working in FF and netscape, it shows it as blue and underlined yet in IE all is fine.

    Here is my code:
    <TD height=21 colspan="5" bgcolor="#336699" class="header"> <div>
                  <a href="http://www.costaandsierra.com/"><h1>Andalucia properties for sale & rent</h1>
                  </a>&nbsp;<font color="#33CC33">Costa de la Luz Sanlucar de Barrameda & Sierra
                  de Grazalema</font></div></TD>
    Code (markup):
    My CSS

    h1
    {
    font-type: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #33CC33;
    text-align: center;
    display: inline;
    }

    .header
    {
    font-type: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #33CC33;
    text-align: center;
    }

    The site is:
    www.costaandsierra.com

    Thanks Ian
     
    ian_ok, Mar 16, 2005 IP
  2. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #2
    Looks fine in Opera...
     
    fryman, Mar 16, 2005 IP
  3. Lever

    Lever Deep Thought

    Messages:
    1,823
    Likes Received:
    94
    Best Answers:
    0
    Trophy Points:
    145
    #3
    I haven't checked this in IE, but how about adding a new style like...
    .header a:link, a:visited
    {
    font-type: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #33CC33;
    text-align: center;
    text-decoration: none;
    }
    Code (markup):
    Then you'll have an anchor state for link and a visited link within the header style...

    And don't forget to add any other link states you require, either in this style for the same, or as a new style for different parameters ;)
     
    Lever, Mar 16, 2005 IP
  4. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #4
    I think <a> is overriding your h1 style. You need to create another style for a:link,a:visited such that both are same. But then you have to be careful , other wise your entire page links will be same type.
     
    Tuning, Mar 16, 2005 IP
  5. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok done it, added the code bt Lever removed my .header and then made the text after the H1 tag bold.


    Thanks

    Ian
     
    ian_ok, Mar 19, 2005 IP
  6. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Did you mean

    .header a:link, .header a:visited {}

    Without the second .header, a:visited will apply to all a:visited's.

    J.D.
     
    J.D., Mar 19, 2005 IP
  7. ian_ok

    ian_ok Peon

    Messages:
    551
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry a very tired reply yesterday....after all day testing various things....

    This is what I did.

    h1
    {
    font-type: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #33CC33;
    text-align: center;
    display: inline;
    }

    .headerindex a:link, a:visited
    { font-type: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #33CC33;
    text-align: center;
    text-decoration: none; }

    <TD height=21 colspan="5" bgcolor="#336699" class="headerindex"> <div align="center">              <a href="http://www.costaandsierra.com/"><h1>Andalucia properties for sale & rent</h1>
                  </a>&nbsp;<font color="#33CC33"><strong>Costa de la Luz Sanlucar
                  de Barrameda & Sierra
                  de Grazalema</strong></font></div></TD>
    Code (markup):
    Ian
     
    ian_ok, Mar 20, 2005 IP