BAD_SEED
BAD_SEED

Reputation: 5086

How to center two div put side by side

I have this situation http://jsfiddle.net/QrMn8/3/embedded/result/. Two divs put side by side, wrapped by a bigger div. What I want is to center the tables inside the two div. What can I do?

Upvotes: 0

Views: 380

Answers (2)

user1289347
user1289347

Reputation: 2407

Your tables are inherently 100% of the width of the container. So I set width: 291px; to the tables and boom no problems. http://jsfiddle.net/QrMn8/6/embedded/result/

Upvotes: 1

user1329212
user1329212

Reputation:

You should use a container div. and use margin:0 auto; for that container div

Upvotes: 2

Related Questions