Page 1 of 1

css and tables

Posted: Sun Apr 01, 2007 5:02 pm
by s.dot
I have an app set up so that users can choose options from a table that is displayed like this:

Code: Select all

<table>
	<tr>
		<td>cell one</td>
		<td>cell two</td>
	</tr>
</table>
For the final display, I want to take this table and align it vertically, not horizontally. So the DISPLAY result would be the equivilant of:

Code: Select all

<table>
	<tr>
		<td>cell one</td>
	</tr>
	<tr>
		<td>cell two</td>
	</tr>
</table>
Is it possible to do this using css only? I'm not familiar enough with the application to write a new page, however if I could style it to display that way, I could achieve my desired result.

I've messed around with display: table-row, table-cell, and table-row-group, but so far no luck.

Posted: Sun Apr 01, 2007 8:08 pm
by feyd
How about using a styled unordered list?

Posted: Sun Apr 01, 2007 8:54 pm
by JellyFish

Posted: Mon Apr 02, 2007 10:17 am
by pickle
What if you set the <td> "display" property to "block"?

Posted: Mon Apr 02, 2007 10:40 am
by Kieran Huggins
what you need to use is the correct CSS property: {vertical-align: middle;}

the TD should default to the correct display type (table-cell) - if you change it 'vertical-align' won't work

Posted: Mon Apr 02, 2007 1:24 pm
by Benjamin
Sounds pretty ugly to me. I would go with feyds solution, as it is the proper way to do it. There are tons of resources if one where to search for CSS LIST MENUS or something similar.