Killersites.com Homepage Welcome Guest   |   Register  |  Login
Login Name Password
  Search  
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help


Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 7186 times and has 2 replies Next Thread
Male admin
Advanced Member
Member's Avatar


Joined: Jun 14, 2003
Post Count: 2940
Status: Offline
Reply to this Post  Reply with Quote 
Create link roll-over affects without images - a basic CSS 'menu'.

CREATE LINK ROLL-OVER AFFECTS WITHOUT IMAGES - A BASIC CSS 'MENU'.

- -

Just add this code in between the <head> </head> tags in your HTML page:

<style type="text/css">
<!--
:link { color: rgb(0, 0, 153) } /* for unvisited links */
:visited { color: rgb(153, 0, 153) } /* for visited links */
:hover { color: rgb(0, 96, 255) } /* when mouse is over link */
:active { color: rgb(255, 0, 102) } /* when link is clicked */
--> </style>


The above CSS will cause your links to change color when someone hovers their mouse pointer over it, instant rollovers with no images!

One thing to pay attention to: is that it is important that the style declarations be in the right order, otherwise it may break things in some browsers:

"link-visited-hover-active"

A good way to remember the order is with the term: love-hate
----------------------------------------
Stefan Mischook

Video Tutorial Store | Web Templates
----------------------------------------
[Edit 3 times, last edit by admin at Sep 29, 2005 2:32:04 AM]
[Sep 29, 2005 2:25:18 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male LSW
Advanced Member
Member's Avatar

USA
Joined: Nov 27, 2003
Post Count: 6285
Status: Offline
Reply to this Post  Reply with Quote 
Re: Create link roll-over affects without images - a basic CSS 'menu'.

That is however only a Mouse Over. Those who use a keyboard to navagate for whatever reason will not have that rollover.

To fix this copy your :hover style 2 more times.

a:focus {paste in your style} will allow the rollover when the key goves the link focus in all standards compliant browsers.

* html ??? a:active {paste styles} will trick IE into a :focus style rollover as up to IE6 :focus is not supported. ??? represents where a class r ID name of the parent element would be added dependig on the name you use. ie. - * html #menu a:active

Rollovers are sometimes very important for the visually impaired to spot links, so the extra code for keyboard users should be used as well.
[Sep 29, 2005 6:11:59 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male admin
Advanced Member
Member's Avatar


Joined: Jun 14, 2003
Post Count: 2940
Status: Offline
Reply to this Post  Reply with Quote 
Re: Create link roll-over affects without images - a basic CSS 'menu'.

@LSW,

That was exactly what I was hoping for - people improving on and making comments on tips.
----------------------------------------
Stefan Mischook

Video Tutorial Store | Web Templates
[Sep 29, 2005 9:12:20 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread