PDA

View Full Version : a little html/java help please



seanmacintosh
March 30th, 2003, 07:30 PM
Hi -

Anyone know how to achieve the effect this page:here (http://surfstation.lu/) uses for its links. Initially, I thought it was a rollover, but the text is selectable. I've viewed the source for the page but can't seem to find it.

I really apreciate your help. - I'd also love if there was any way to do it in dreamweaver since I'm not that web savy:smirk:

Thanks,
/sm

abzoid
March 30th, 2003, 07:45 PM
It's done by using the command below within a cascading style sheet (css).

A:hover {COLOR: #ffffff; BACKGROUND-COLOR: #fe2a04}

seanmacintosh
March 30th, 2003, 11:59 PM
Thanks - I'm kinda with you, but I'm not seeing the "roll over effect".

Let's say for example I'd like to link the word "here" in black text (with a white hover/roll over state) to a webpage called there.html. Now; I've found the "hover" command in the css under the radio button 'use css selector', but I'm not sure I'm appling it correctly?

Do I need to make a Custom Style Class first and then add the A:hover to that? This is what I've tried, but it doesn't appear to work in my browser.:q:

Do you think you could walk me through it like the beginner I am - I would truly appreciate it.

Thanks
/sm

abzoid
March 31st, 2003, 12:23 AM
The example below will make a RED link change to WHITE with a BLUE background on rollover. Modify the color codes as need.

Within the HEAD of your HTML page:

<style type="text/css">
A:link {COLOR: #FF0000}
A:hover {COLOR: #000000; BACKGROUND-COLOR: #0000FF}
</style>
Yup, just that simple. :)

seanmacintosh
March 31st, 2003, 01:57 AM
that worked liked a charm, many, many thanks!:)

DDD
April 2nd, 2003, 09:26 PM
another good way to expand this css thing is:




<!----put this in your td or href tag------->
onMouseOver="this.className='yourcss';"

onMouseOut="this.className='yourOthercss';"



this will swap classes pretty cool for expanding the above css snippet