Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Aligning Four Objects in a row


yisraelharris - 10:00 am on Mar 19, 2007 (gmt 0)


I am very new to table-less css. I would like to accomplish the following with table-less css:

I have 4 elements that I want displayed:

1. A small icon.
2. Three words of text.
3. Three more words of text.
4. Another small icon.

I want them displayed as follows:

A. All 4 elements lined up horizontally, within a width of, say, 500 pixels.
B. Items 1 & 2 to be left-aligned and items 3 & 4 to be right-aligned.
C. The space between item 1 & 2 and between item 3 & 4 to be exactly 10px.
D. I don't know in advance what the exact text of items 2 & 3 will be, so I don't know exactly what their widths will be.

There should be an easy way to do this, shouldn't there?


Thread source:: http://www.webmasterworld.com/css/3286071.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com