Forum Moderators: not2easy
I thought it would be some type of padding effect in a:hover... but I'm not sure how to go about it without an example, and I'm not even sure if the effect is called anything in particular so I've had no luck finding info on it.
Any help is greatly appreciated.
-Ariel
a { border: 2px outset #aaa; }
a:hover { border-style: inset; } And in something so simple as changing the border from
outset to inset, you can make a button look. In my opinion, this isn't very pretty though - I personally would rather it as an image :) Nicer raised button look/depressed button look :)
[edit]
P.S.: if you want the text to move too, you can add padding to it too:
a { padding: 2px 8px 3px 7px;
border: 2px outset #aaa; }
a:hover { padding: 3px 7px 2px 8px;
border-style: inset; } To mimick a 'shift' in text on hover :)
[/edit]
[edited by: Setek at 3:13 am (utc) on Aug. 10, 2006]
(I agree with you on the image over inset... I am actually looking to shift image links with the code I'm searching for, to make them appear to be pressed, but without a double image rollover.)
------------------------
That edit was it... Thank you so much, your'e wonderful.
so it would yield something like:
.menu {background-image:up.png;...}
.menu:hover {background-image:down.png;...}
and in the html:
<a class="menu">item1</a>
sizing and positioning the whole thing can be tricky,
you could also use tricks not to display the text and only display the image etc.
There are also examples that use much more complex structures with named items and huge css files, but it all depends on how far you want to tweak it in order to chase a specific look.
Success!
I'm not sure about text that moves when you hover as it might feel the text evades the pointer when you try to click it.