Kasper van der Hoofd
Kasper van der Hoofd

Reputation: 43

Aligning items using display: inline-block;

I have a problem that i don't know how to fix.

This is my JSFiddle code.

I don't know how to get all of the items inside the top bar properly. There also happens a strange thing: when i put some text inside the ID=toplogo, all the elements shift a bit. What causes this problem and how can i fix it?

please help

Upvotes: 1

Views: 52

Answers (2)

mangeohlin
mangeohlin

Reputation: 42

Edited your fiddle.

Basically I added:

overflow:hidden

..to your inline-blocks and set

line-height = height of block

..to align the text instead of using padding.

Check out the edits here

Upvotes: 1

YoYo
YoYo

Reputation: 45

why you use padding-top for those login and signup ?

It is suggested to use <ul> instead of div's for menu

You want to achieve like this ?

check this fiddle

Upvotes: 0

Related Questions