Forum Moderators: not2easy

Message Too Old, No Replies

Way to add options for "content" in :before/:after pseudo classes

         

impquestion

11:38 am on Aug 29, 2010 (gmt 0)

10+ Year Member



Hello,
is there a way to add options (align=absmiddle exactly) for an image defined by content attribute? Code looks like:
#object:before {content:url('image.png');}

And I need to align image.
The thing I'm trying to do is to create page menu, with rounded images before and after it when hovered:

(css-hovered-before image)TEXT(css-hovered-after image)

but text aligns itself down when image is displayed.

Or - is there way to align text in the vertical middle of parent element (using span right now)

Thanks.

Shado

6:38 pm on Aug 30, 2010 (gmt 0)

10+ Year Member



Can you post your code?

As I understand it I would think that what you are after is link effects.

a:link {/* unvisited link */ }
a:visited {/* visited link */ }
a:hover {/* mouse over link */ }
a:active {/* selected link */ }

To align text your container needs to have width and then you can apply margins to position it.

With out code I'm not able to see what you mean in your post but I hope this might help.