Jump to content

Recommended Posts

Posted (edited)

Thanks a lot, that works. Could somebody explain me (or point me to a good tutorial) how to do a rollover button using html or Css? I mean a button which is only a line of text that changes colour when the cursor goes over it and that changes colour again when the link is visited? I have had lots of problems with flash lately after the Microsolf update and I am going to ditch all the flash stuff from my site:

 

www.pedaldoc.com

 

Regards and thanks in advance to everybody.

 

Ivan.

Edited by ivanmax
Posted

Hello,

 

Its all to do with with the A href css tag. Remember, all these CSS bits but fit in the

><head>
<style type="text/css">
INSERT HERE
</style>
</head>
<body>
</body>
</html>

 

E.g. insert this bit in your style area in the <head> tag

><style type="text/css">
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: underline; color: red;}
</style>

 

Then if you add this in your body content area:

><a href="www.totalchoicehosting.com">The Worlds best web hosting company</a>

 

Now try it out.

 

Each one of the link, visited, active and hover are self explantory really and you can do just about everything you want to them.

 

E.g. this turns it to red background:

 

><style type="text/css">
A:link {background: #FFCC00; text-decoration: none}
A:visited {background: #FFCC00; text-decoration: none}
A:active {background: #FFCC00; text-decoration: none}
A:hover {background: #FFCC00; font-weight:bold; color: red;}
</style>

 

Or you could have several classes:

>.class1 A:link {text-decoration: none}
.class1 A:visited {text-decoration: none}
.class1 A:active {text-decoration: none}
.class1 A:hover {text-decoration: underline; color: red;}

.class2 A:link {text-decoration: underline overline}
.class2 A:visited {text-decoration: underline overline}
.class2 A:active {text-decoration: underline overline}
.class2 A:hover {text-decoration: underline; color:green;}

 

and then:

><span class="class1"><a href="www.totalchoicehosting.com">The Worlds best web hosting company</a></span>
<span class="class2"><a href="www.totalchoicehosting.com">The number one hosting comapny</a></span>

 

Give it a try, any problems, give us a shout!

 

JimE

Posted

Thanks a lot to everybody. Let´s see if I can get rid of those dodgy flash buttons. They look really horrible after the microsoft update!

 

Thanks again,

 

Iván.

Posted

As you do this, remember that for accessability reasons you don't want to exclusively use color to identify links on your page. There are a good percentage of people out there who are color blind who won't be able to differentiate between colors to know what is a link and what isn't.

 

It's not a bad idea to take a screen shot of your page and view it in Photoshop (or similar) and convert the image to greyscale. If the you can still differentiate between normal text and links then you're probably okay.

 

Removing the underline on links can make it hard for your users to know WHAT is a link and what isn't...

Posted

Don, I love the Listamatic site. Quick easy reference!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...