Reputation:
I just started learning HTML and CSS from one guy tutorials and I have a problem. I want that my navigation and heading would be at one line, but when I type display: inline; it doesn't do anything.
Here's the photo:
My HTML and CSS: http://pastebin.com/uZunJFr7
Any help?
Upvotes: 0
Views: 87
Reputation: 1397
You are setting rules for nav ul
instead of nav
, which is the sibling of h1
in your code, and is the one that needs to line up with it. Also, use inline-block
instead of inline
.
Working fiddle: http://jsfiddle.net/fzhg4cof/
Upvotes: 1
Reputation: 4318
do this:
header h1 {
margin: 0;
float: left;
}
heres a fiddle --> https://jsfiddle.net/dnqxLwkp/
Upvotes: 1