Code:
div {
border:solid 1px #000;
float:left;
margin:5px 15px;
}
h1 {
border-bottom:solid 1px #000;
text-align:center;
}
<h1>Title Here</h1>
<div>Important Info</div>
<article> [lots of text] </article>
How do I make the h1 and its border only as wide as whatever text it contains? It was suggested I add this to the h1 style:
Code:
display:inline-block
But that makes the float misbehave: