I'm trying to construct a two row table similar to following:
---
-
where the bottom is filling the space of the upper row. Is this possible using CSS?
Edit: as I was afraid of, there's no way to do this.
|
I must respectfully disagree with the answer that colspan is exclusively indicative of structure, and the implicit notion that you shouldn't even be trying to solve your problem this way. To say this with no room for dispute is, at worst, naive, or at best, disingenuous. It is not in service to the person asking the question. If you have a section of a table that you choose to span multiple columns for appearance's sake, then it isn't structural. It's appearance. And, despite this, there's no simple, elegant CSS analog for it. That's the honest answer, and I say that as a CSS fan. CSS does many things very, very well. Tables are not among them. That may not be the popular answer, but I believe it to be the honest one. The truth is that the distinction between structure and presentation is not a bright white line, but a decidedly blurred one. I won't presume to tell you your need for spanning columns is right or wrong. Searches on this very issue will return a variety of solutions that include a bevy of alternatives, including absolute positioning, sizing, along with a similar variety of browser- and circumstance-specific caveats. Read, and make the best informed decision you can based on what you find. |
|||||||||||||||||||||
|
http://www.quackit.com/css/css3/properties/css_column-span.cfm |
|||||
|
if you use div and span it will occupy more code size when the datagrid-table row are more in volume. This below code is checked in all browsers HTML:
CSS:
|
|||
|
Not to resurrect an old topic, but I was just trying to do a similar thing... You could always JJ |
|||
|
There is no colspan in css as far as I know, but there will be This would be the HTML:
And this would be the css:
The only reason to use this trick is to gain the benefit of But if you don't need to benefit from the |
|||
|
You could trying using a grid system like http://960.gs/ Your code would be something like this, assuming you're using a "12 column" layout:
|
|||
|
That isn't part of the purview of CSS. |
|||
|
|
|||||
|