I\'m having a bit of a problem. I\'m using FireFox 3.6 and have the following DOM structure:
-
If you're using display:table-row
etc., then you need proper markup, which includes a containing table. Without it your original question basically provides the equivalent bad markup of:
Type
Name
Where's the table in the above? You can't just have a row out of nowhere (tr must be contained in either table
, thead
, tbody
, etc.)
Instead, add an outer element with display:table
, put the 100% width on the containing element. The two inside cells will automatically go 50/50 and align the text right on the second cell. Forget floats
with table elements. It'll cause so many headaches.
markup:
Type
Name
CSS:
.view-table
{
display:table;
width:100%;
}
.view-row,
{
display:table-row;
}
.view-row > div
{
display: table-cell;
}
.view-name
{
text-align:right;
}