cocoa coder
cocoa coder

Reputation: 214

Aligning li Elements in a Div

I need to align 3 different elements in my div. They are in a ul list: Left, Center and Right.

I tried to use float: right for the right element, and margin: 0 auto with a width for the element in the center. But still it doesn't align automatically.

The elements can also be images, not only text. http://jsfiddle.net/PwmrC/

Upvotes: 0

Views: 81

Answers (1)

alexbusu
alexbusu

Reputation: 741

display:table and table-cell may be your solution. Here is the fiddle demo.

Later edit: Reworked example

Upvotes: 1

Related Questions