NickC
NickC

Reputation: 1363

Cross browser vertical text alignment

Can anyone explain why vertical text alignment is so different between browsers?

See code below:

<!DOCTYPE html>
<html>
<body>
	<p style="background: grey;   font-size: 400%;">Test text &lArr;</p>
</body>
</html>

This displays quite differently between Firefox and Internet Explorer. Is there some css setting I can use to make this the same across all browsers?

Upvotes: 0

Views: 137

Answers (2)

ExploreNav
ExploreNav

Reputation: 396

Just Give default style to body tag like below

body{padding:0; margin:0; line-height: 1.1;}

Upvotes: 1

Leonardo Costa
Leonardo Costa

Reputation: 470

You can use this library to normalize their web pages across browsers.

Normalize

I have helped you in any way

Upvotes: 2

Related Questions