Welcome to WebmasterWorld Guest from 54.211.136.250

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Newbie Q's on Mouseovers and Backgrounds

   
3:02 pm on Jan 8, 2003 (gmt 0)

10+ Year Member



What's the easiest way to get normal HTML text to become underlined when mouse over?

For a site such as bbc.co.uk how is the colour squares done? Is it one big BG image or is this tables with a colour BG given to each table?

Cheers all.

4:11 pm on Jan 8, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



What's the easiest way to get normal HTML text to become underlined when mouse over?

It needs to be a link. You would make a css style like so placed in the head tag:

<style>
A {text-decoration:none;}
A:hover {text-decoration:underline;}
</style>

A {text-decoration:none;} - this makes links not have an underline when no mouse is over it.
A:hover {text-decoration:underline;} - This makes the underline on mouse over.
The text-decoration style also has overline, line-through, and blink.

Not sure about the color squares I don't see them at the bbc.

11:51 am on Jan 10, 2003 (gmt 0)

10+ Year Member



It's not necessary to make it a link.

The hover pseudo-class should now be supported on all elements, so you'll just need to do this: <span class="on-hover">my-text</span> and then in the css declare

.on-hover:hover {what-style-you-want}

but do test it in your browser of choice - only the best of browsers can make this work :-)