|
Posted by jojo on 12/28/58 11:54
jojo schrieb:
> jamie_cockburn@hotmail.co.uk wrote:
>>
>> I'm not sure if this is possible, but here goes...
>>
>> I want some sort of area (div preferably, td otherwise) that when
>> moused over, changes it's style (bgcolor) and is also a link, as in,
>> the whole area is a link, not just the text inside. I'd like this to
>> work in both IE and Firefox, and preferably without
>> any javascript.
>>
>> Anyone got any clues, cause I've been trying all day with no avail.
>>
> Make a link (<a>) a block element first. Add some padding around the
> text, and - you have your area which is a link. Now you just have to
> define a different background-color for a:hover. Done.
> The CSS-code:
>
> a.blockLink {
> display:block;
> padding:20px;
> background-color:white;
> }
> a.blockLink:hover {
> background-color:fuchsia;
> }
>
> And the link should look like this:
>
> <a class="blockLink" href="www.google.de">This is a link to Google</a>
>
> The only problem: ASFAIK this does not work in IE.
>
> HTH, jojo
Update: seems to work in IE.
[Back to original message]
|