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 2:26

There's something about HTML5 that doesn't allow you to use the line-height property on <code> tags.
i call bullshit. http://dev.w3.org/html5/spec/Overview.html#the-code-element specifies no such thing. also, line-height works fine with <code> tags in my browser:
data:text/html,<!DOCTYPE html>%0a<html><head><style type="text/css">p{border:1px solid black}code.big{line-height:1000%}</style></head><body><p><code>normal</code></p><p><code class="big">big</code></p></body></html>

your problem seems to be that your <code> is not in a paragraph.

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