Karem
Karem

Reputation: 18103

CSS: Centering this element

I tried for like an hour now getting it centered really fustrating I dont know how I should get it centered:

http://jsfiddle.net/KDUtP/

Notice that this is to a scrollable jquery plugin (just so you know, so dont complain for the maybe unnecessary css)

Upvotes: 0

Views: 74

Answers (3)

Ray
Ray

Reputation: 1222

Give the container div a display: block; and add margin: 0 auto; to it.

margin: 0 auto;
display: block;

Upvotes: 0

Ian Pugsley
Ian Pugsley

Reputation: 1062

Why is your container display: inline-block?

If you don't care about this, you can use margin: 0 auto to accomplish the centering.

Upvotes: 0

Elbert Alias
Elbert Alias

Reputation: 1790

Not sure what you're trying to do exactly but how is this?

http://jsfiddle.net/KDUtP/4/

Upvotes: 2

Related Questions