cufon icon indicating copy to clipboard operation
cufon copied to clipboard

cufon element/class: vertical-align: middle, unable to override.

Open gRoberts84 opened this issue 13 years ago • 2 comments

Hey all,

I've only just noticed that (at least in Firefox) the cufon elements are set to vertical-align: middle.

When trying to override it with CSS by using:

#path-to-element-being-cufoned cufon

or

#path-to-element-being-cufoned .cufon

and setting the

vertical-align: top;

Cufon's default style is not overriden, because it's rendered after my CSS document.

I've had a look around the documentation and can't seem to find anything. The line-height is set to the height of the parent containter and that still doesn't help.

Any suggestions?

Cheers

gRoberts84 avatar May 05 '11 15:05 gRoberts84

This will change in the next version (check the dev branch if you're interested). Until then you can override the value by using !important and making the selector a bit more specific:

body cufon { vertical-align: top !important; }

sorccu avatar May 05 '11 15:05 sorccu

Cheers, but I'm trying to only target one specific element, as in my original post.

As a fudge/hack, I've simply set a negative top margin on the .cufon/cufon selector within the element I want to change. God knows whether it works on all browsers, watch this space ;)

Thanks again :D

gRoberts84 avatar May 05 '11 15:05 gRoberts84