David542
David542

Reputation: 110113

Placing text inline after a Header

I have the following HTML:

<h3> HEADER </h3>
<a href="link">Edit</a>

How would I place the link so it comes directly after the Header? It should appear like --

**HEADER** link

I was thinking to float: left the link, but it was still appearing on the line after HEADER. Thank you.

Upvotes: 10

Views: 7921

Answers (2)

David542
David542

Reputation: 110113

Also can use

h3 {
 display: inline-block:
}

to keep height of header element.

Upvotes: 4

Bazzz
Bazzz

Reputation: 26912

By giving the header inline

h3 {
 display: inline;
}

Upvotes: 13

Related Questions