Sunday, 15 September 2013

Trying to stack lines closely in HTML

Trying to stack lines closely in HTML

This should be simple, but I'm not getting it. I'm trying to get three
lines (one small-font, one big, one small) to stack against each other
with single-spacing. Instead, the big-font line always has a double-space
above it (for 48-pt, there's a 48-pt line above it).
I've played with margins, padding, height, borders; I've stripped
everything out but the bare essentials, and I still can't get the top and
middle lines to lie nicely against each other.
Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<div style="
font-size:16px;
height:16px;
padding:0px;
border:0px;
margin:0px">
<p>Line 1<p></div>
<div style="
font-size:48px;
height:48px;
padding:0px;
border:0px;
margin:0px">
<p>Line 2</p></div>
<div style="
font-size:16px;
height:16px;
padding:0px;
border:0px;
margin:0px">
<p>Line 3</p></font>
</html>

No comments:

Post a Comment