4 replies [Last post]
Fruitcake
Offline
Enthusiast
Perth, Australia
Last seen: 14 years 20 weeks ago
Perth, Australia
Timezone: GMT+8
Joined: 2004-04-12
Posts: 257
Points: 0

I want to get two tables in a div box aligned next to each other and aligning the tops of them.

How do you do vertical alignment in css?

I am Dan, Dan I am.

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 40 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Vertical alignment

Hi

Put the tables in a div each. set each div to float:left

Then for the next div, set that to clear:both

Or something like that. Use margins to move them apart.

Trevor

Fruitcake
Offline
Enthusiast
Perth, Australia
Last seen: 14 years 20 weeks ago
Perth, Australia
Timezone: GMT+8
Joined: 2004-04-12
Posts: 257
Points: 0

Vertical alignment

That didn't produce a very desirable result. it bocked out the top bit of the first div and then the contents of the second div went underneath again anyway.

I tried puting the table as an inline display, but of course mozilla made it and the trs tds etc. decided to wrap to the top left corner of the table and made a giant mess. Is there any other way i could fix it?

I am Dan, Dan I am.

co2
co2's picture
Offline
Leader
UK
Last seen: 14 years 18 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Vertical alignment

Do you mean something like this: http://pub.c-o2.net/cssf/tbl.htm ?

The next sentence is true. The previous sentence is false. Discuss...

Fruitcake
Offline
Enthusiast
Perth, Australia
Last seen: 14 years 20 weeks ago
Perth, Australia
Timezone: GMT+8
Joined: 2004-04-12
Posts: 257
Points: 0

Vertical alignment

exactly thanks Smile

I am Dan, Dan I am.