Split a table cell contents into different formatting - CSS
Posted: Wed Sep 06, 2006 1:43 am
Ok ... I tried to makethe subject descriptive but it's still pretty crap, so let me explain.
I have a table showing a product list, one product per line with the item name and description in one column and cost in another.
I'm trying to get the item name to be shown in standard size bold, and the rest of the description in a small font. Where the small text is longer than the cell allows, I want it to wrap but not under the bold part, just under the other rest of the small text. The bold text would then be centered against the two small text lines.
So, Ok ... I could just split the cell and show names in one and descriptions in the other, however it's not the look I'm after. I want each rows name and description to flow on, as opposed to inserting a big break on all names shorter than the longest one.
At the moment, I am inserting a nested table with two columns and applying the formatting to the cells to get this appearance, but I'm hoping there is something easier in CSS.
Any help would be great.
I have a table showing a product list, one product per line with the item name and description in one column and cost in another.
I'm trying to get the item name to be shown in standard size bold, and the rest of the description in a small font. Where the small text is longer than the cell allows, I want it to wrap but not under the bold part, just under the other rest of the small text. The bold text would then be centered against the two small text lines.
So, Ok ... I could just split the cell and show names in one and descriptions in the other, however it's not the look I'm after. I want each rows name and description to flow on, as opposed to inserting a big break on all names shorter than the longest one.
At the moment, I am inserting a nested table with two columns and applying the formatting to the cells to get this appearance, but I'm hoping there is something easier in CSS.
Any help would be great.