Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anchor element becoming display:block in HTML5 instead of display:inline with cufon

Tags:

html

anchor

cufon

I got <a> elements that are display:inline in html4 and page displays fine (like I want it to).

Now I am updating my page with new html5 and as a result following cufon link becomes display:block instead of display:inline, which is not desired by me.

enter image description here

I would like them to remain inline though because since they are display:block now they are centered according to their total height, and when link is underscored for example it aligns vertically and looks not like links in the same row which don't have underscore for example.

I wonder what can be done to either remain inline or to stop from that vertical centered alignment. Just to be clear I want my text to have fixed top, regardless of [letter + underscore].[actual height].

UPDATE I actually was able to get rid of such behaviour. I have no idea what has really helped, I noticed that on some pages same links were displayed as inline actually, and that page was referencing a smallish additional css. I added a css reference on buggy page and it worked. However I cannot see anything in that CSS that I can consider to be the reason of a fix.

basicly all it has which is relevant to part of html in question is this:

body, html, form
{
    display:block;
    list-style:none;
    text-align:left;            
}

Since theres already a bounty Ill go ahead and change question a little: I wonder how this helped. Or what is going on actually with this and cufon here. Im puzzled a little.

like image 328
Valentin Kuzub Avatar asked Nov 27 '25 02:11

Valentin Kuzub


1 Answers

Add a display:inline !important to proper tag.

like image 186
pmaruszczyk Avatar answered Nov 28 '25 16:11

pmaruszczyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!