Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

☆ HTML5 ☆

Name: Anonymous 2010-05-26 1:45

There's something about HTML5 that doesn't allow you to use the line-height property on <code> tags.

This is terrible!

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
code {line-height:90%;}
p.big {line-height:270%;}
</style>
</head>

<body>
<p>
This is a paragraph with a standard line-height.
The default line height in most browsers is about 110% to 120%.
This is a paragraph with a standard line-height.
</p>

<code>
This is a paragraph with a smaller line-height.
This is a paragraph with a smaller line-height.
This is a paragraph with a smaller line-height.
</code>

<p class="big">
This is a paragraph with a bigger line-height.
This is a paragraph with a bigger line-height.
This is a paragraph with a bigger line-height.
</p>

</body>
</html>

Name: Anonymous 2010-05-26 5:49

Hmm, for some reason, CODE is defaulting to inline...

code {display:block; line-height:90%;}
That seems to fix it.
Also, inline-block works as well if you have specific need for inline.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List