mouseover thingymajig??
- Started
- Last post
- 21 Responses
- navitronic
What is the easiest way of doing that mouseover thing like in PBS frame where the background of what seems to be a table cell changes colour when you put the mouse over it? is it css or javascript?
- bug0
css
- kerus0
css - hover state background color
- k770
end
- ER0
to my knowledge, that is not css, hover state; background color just contols the box around the link text. not the background of the table/cell.
i believe you would need something like java script to do the background color "thingy".
- stewart0
comon, you don't know how to view the source of a html file?
look at this:
[td bgcolor="#adadad" onMouseover="this.style.backgrou... onMouseout="this.style.backgroun...
- Recycle0
You can do it cleaner and faster in CSS:
A:hover {background color: red;}
That's it :)
- Recycle0
Crap, I made a typo:
A:hover {background-color: red;}
Note the dash between 'background' and 'color'.
- vena0
you can't do a hover state on any element other than an anchor, and wrapping a table cell in an anchor won't work besides being silly.
- joyride0
I hear ya skewie, but just because I open a book written in another language doens't mean I can read it.
But yeah, use stewarts. You can also use gifs with transparent boarders or other things to change the boarder colour that way.
- jpolk0
border... it's border.
- kerus0
woops. i misunderstood.. thought they meant the highlighting "block" on links.
- Recycle0
Technically you can put a hover state on any element, even a table cell, as long as you are using a CSS-2 compliant browser.
Safari, Mozilla, Firebird, Opera, and all the rest support this. IE, of course does not.
Go with stewart.
- stewart0
...and if you want to know how to change the background color of the table, the color of the text in it + all the hyperlinks in the table and maybe also the border of the table with just ONE mouseOver, ask me...
today Mitsu learned me how to tackle this.
- stewart0
and can someone please tell me, does "border: 1px dotted" on a table work on pc?
i heard that 4px long strokes appear around the table when you use this?
(on my mac it works)
- vena0
there's a bug with dotted borders in IE that makes them appear as dashed. the only workaround i know of is to make it 2px instead of 1px and then IE will render it correctly.
- stewart0
thanks vena,
but do you know in what versions of IE this dashed line appears?
maybe you can look at this:
http://www.vahk.nl/client/nedap/…in the first line of text here i used 1px line as hyperlink accent.
- vena0
as far as i know, all relevant version of IE (5+) have this bug. it's never been fixed.
- stewart0
tell everybody:
install Netscape 7 NOW!
- stewart0
border-width in cm ?!
and
1 cm = 28 px at 72 dpi ?