SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast ericthehalfbee's Avatar
    Join Date
    Oct 2001
    Location
    Auckland, NZ
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hover browser incompatibility?

    Hi

    What I'm trying to achieve are different a:hover colours in a document.

    http://www.wombatsweb.co.nz/organics...st_members.php

    shows the site and the relevant bits are the 'About' and 'Members' links in the top left and the 'Further Details' links lower down on the right.

    The way I'm trying to do it via CSS is as follows.

    Code:
    a, a:active, a:visited {
    		text-decoration: underline;
    		color: #000;
    }
    a.header_link {
    		font-size: 14px;
    		text-decoration: none;
    		font-weight: bold;
    		color: #f93;
    }
    a:hover {
    		text-decoration: none;
    		color: #00f;
    }
    a:hover.header_link {
    		font-size: 14px;
    		text-decoration: none;
    		font-weight: bold;
    		color: #fff;
    }
    .header_link {
    		font-size: 14px;
    		text-decoration: none;
    		font-weight: bold;
    		color: #f93;
    }
    .header {
    		font-size: 14px;
    		text-decoration: none;
    		font-weight: bold;
    		color: #fff;
    }
    and the relevant HTML

    Code:
    <?php 
    if(strstr($HTTP_SERVER_VARS['PHP_SELF'],'about')){
    ?>
    <span class="header">About</span>
    <?php
    }else{
    ?>
    <a href="about.php" class="header_link">About</a>
    <?php
    }
    ?>
    <br />
    <?php 
    if(strstr($HTTP_SERVER_VARS['PHP_SELF'],'members')){
    ?>
    <span class="header">Members</span>
    <?php
    }else{
    ?>
    <a href="list_members.php" class="header_link">Members</a>
    <?php
    }
    ?>
    This way works fiine in NN 7 , the current page is white and the top links are beigy mouseoveringing to white with the others going blue but it doesn't in IE 6 where the link stays black.

    Is this just tough or am I missing something about CSS here.

    Thanks
    Last edited by ericthehalfbee; Apr 16, 2003 at 23:18.

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried to take a look in IE5Mac but the site is catastrophically wrecked in that browser.

    Looks dandy in Camino though.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  3. #3
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ericthehalfbee
    Code:
    a:hover.header_link {
    font-size: 14px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    }
    Correct me if i'm wrong, but shouldn't that be:

    Code:
    a.header_link:hover {
      font-size: 14px;
      text-decoration: none;
      font-weight: bold;
      color: #fff;
    }

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    fatnewt is right. Use his suggestion.

  5. #5
    SitePoint Enthusiast ericthehalfbee's Avatar
    Join Date
    Oct 2001
    Location
    Auckland, NZ
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    fatnewt is right. Use his suggestion.
    I think fatnewt may be right but unfortunately it doesn't seem to be the answer. Doesn't make it any worse though and still ok in NN.

    Havn't checked it for a while on the Mac - must've done something bad, not too bad I hope.

    Thanks

  6. #6
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ericthehalfbee
    Havn't checked it for a while on the Mac - must've done something bad, not too bad I hope.

    Thanks
    Just checked it again i both my browsers.

    IE5 is now looking 'less broken', but still badly broken.
    The bad news is that Camino is no longer showing it perfectly, but is now displaying the same partly (but badly) broken impression as IE5.

    I'll check again in a few days time once you've got the problem in hand fixed.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  7. #7
    SitePoint Enthusiast ericthehalfbee's Avatar
    Join Date
    Oct 2001
    Location
    Auckland, NZ
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Bill Posters

    I'll check again in a few days time once you've got the problem in hand fixed.
    Thanks. Appreciate that,access to the mac's a bit limited.
    Bit of an easter delay,sorry.

    Sorted the different colour links and hovers by including the following in the CSS and using the class "header". Now seems to work in most browsers.



    Code:
    a, a:active, a:visited {
    		text-decoration: none;
    		color: #00f;
    }
    a:hover {
    		text-decoration: underline;
    		color: #00f;
    }
    a.header, a.header:active, a.header:visited {
    		font-size: 14px;
    		font-weight: bold;
    		text-decoration: none;
    		color: #f93;
    }
    a.header:hover {
    		font-size: 14px;
    		font-weight: bold;
    		text-decoration: underline;
    		color: #fff;
    }
    .header {
    		font-size: 14px;
    		font-weight: bold;
    		color: #fff;
    }
    Probably obvious all along.


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
  •