Topic awaiting preservation: CSS thingy . . . (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
posted 10-12-2001 02:20
on the microsoft webpage ( http://www.microsoft.com ), on the left menu, there's a thing that when you mousover a link, it changes the background of the link to grey with a border. Ive looked at the css and tried to get it to work on my site, but it doesnt do anything. could someone try to help me out? thanks. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-12-2001 02:35
here's the most simplified code that *should* do the trick: |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 10-12-2001 02:36
This is a whole lot of code for that technique, a lot of it propietary to MS |
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
posted 10-12-2001 07:41
I'm using a class: |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-12-2001 11:44
AS I said over in the GN I'd just use A: hover - you can simulate this code: a:link, a:visited {
|
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-12-2001 16:00
The reason I gave my solution was because I believed he wanted more than just the hyperlink to be changed on hover, he wanted the entire containing element (like a P tag or a TD tag) to be changed, so that the color changes are the entire width of the menubar (see www.microsoft.com ). |
Maniac (V) Mad Scientist From: Azylum's Secret Lab |
posted 10-12-2001 16:44
So, I'm not wrong if i use that in a Hyperlink?? |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-12-2001 16:45
Slime: Just curious but can't you get the effect by using A: hover and making the link 100% wide or the width of the contraining box if that is fixed width? I'm just curious - I'd use something like onmouseover="this.className='elementOver'" on the TD, P or DIV the link is in if that wasn't possible. I suspect neither of these approaches works in all recent browsers. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-12-2001 16:48
Yup, Wakkos, your way should work, it just might not take up 100% of the width. I'm not sure if you can set a hyperlink to 100% width... maybe someone should try it. You might have to specify display:block; for the hyperlink. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-12-2001 17:47
Slime: Good point. This works in IE5: code: <html>
|
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-12-2001 17:55
And it works fine with borders in IE5: |
Nervous Wreck (II) Inmate From: |
posted 10-12-2001 22:50
hey, thanks for all your, help, I think I'm gonna go with the CSS route, I got it workin' how I want it anyways, thanks to everyone who responded. |