Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    Hi,

    Go to http://xtdesign.net and note that once you've visited any link in the navbar, it doesn't hover as before. I don't know why this happens because in the CSS you can see that I've specified the :visited:hover pseudo-class to have the same look as the not visited one.

    And does somebody have any idea on how to change the CSS to make the links look in IE as they look in good browsers?

    Thanks

  2.  

  3. #2
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    What was your CSS code? And I'm pretty sure their's no such thing as visited:hover
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  4. #3
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    It's here: http://xtdesign.net/css/style.css
    Here is the fragment that contains the navbar elements:
    Code:
    #nav li {
    list-style-type: none;
    position:relative;
    left:-36px;
    margin-bottom:16px;
    width:124px
    }
    #nav a.navlinks, #nav a.navlinks:visited {
    list-style-type: none;
    border:1px solid #000000;
    border-width:1px 2px 1px 4px;
    padding:5px 8px;
    width:124px;
    text-decoration:none;
    color:#FFFFFF;
    margin-top:10px;
    height:25px
    }
    #nav a.navlinks:hover,#nav a.navlinks:hover:visited{
    border-color:#000000 #000000 #FFFFFF #FFFFFF
    }

  5. #4
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    Try to add a semi-colon on the hover line.. Also.. You can't add a list-style-type to a link element.. And you can have 1 psuedo-class per element.. You also didn't put a semi-colon after width: 124px.. You have to put a semi-colon after the last statement always.. Some may still read it but it will mess other browsers up..
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  6. #5
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    Quote Originally Posted by Physt
    Try to add a semi-colon on the hover line.. Also.. You can't add a list-style-type to a link element.. And you can have 1 psuedo-class per element.. You also didn't put a semi-colon after width: 124px.. You have to put a semi-colon after the last statement always.. Some may still read it but it will mess other browsers up..
    The list-style-type goes on the <li> not on the <a>.
    No, don't worry about the semi-colon, if it's the last propertie of the block, you can omit it. I do that to safe a few bytes.
    And AFAIK you can use several pseudo-classes, in the same way you can do "a:visited:active" to set up how the link will look once it's visited and is active.
    I'm sure it has to do with some stupid IE quirk.

    PS- I've added that semi-colons so you can see it doesn't affect anything

  7. #6
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    The last semi-color and the double pseudo element both don't work in IE.. IE is 85% of all users so It's probbably best to find the best marriage you can with all browers.. There are a lot of other things that don't work in IE so you should get used to not being able to do them...
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  8. #7
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    The last semi-colon doesn't work? They are now there, but there is no change.

    It should work in some way, because this is happening the first time to that I can set a visited:hover status in IE, my previous design of the site worked with that even in IE5/Win2000.
    Any clue?

  9. #8
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Code:
    a.navlinks:hover:visited
    Pretty sure that's not allowed. Almost certain. What yo'ure telling it is "find the <a> with a class navlinks, that is in a hover state and visited state (at once)"
    Split those up
    Code:
    a.navlinks:hover, a.navlinks:visited
    Also, try list-style:none; No need for list-style-type, it's less compatable.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  10. #9
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    I wasn't sure that the double pseudo-classes thing would work, but I had to try it because instead of just doing the normal hover, if it's visited it doesn't change to the hover status. Here how it looks now, and it does exactly the same as before:
    Code:
    #nav a.navlinks, #nav a.navlinks:visited {
    	list-style:none;
    	border:1px solid #000000;
    	border-width:1px 2px 1px 4px;
    	padding:5px 8px;
    	width:124px;
    	text-decoration:none;
    	color:#FFFFFF;
    	margin-top:10px;
    	height:25px;
    }
    #nav a.navlinks:hover{
    	border-color:#000000 #000000 #FFFFFF #FFFFFF;
    }

  11. #10
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    I actually had to play around with this for a while and came to the concclusion that I don't know what's going on. For example, if you put in "color:red" into the :hover statement it works. Weird. Everything except border declarations. I'm not quite sure what's oging on to be honest... although, just FYI you're delcaring no list-style on an <a> No need for that. I'll keep trying, but so far no success.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:29 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com