Re: [css-d] making rows line up - tables or css?
I am trying to create a page that isn't going to have the same height content in each row, but needs to line up like this: A B A C D D E F G H G H Off the top of my head, I'd do something like this. Since I don't know what the content is, I'm using generic elements div id=row1 #row2, #row3, #row4 { clear: left; } Roger got the solution, however, the question is: Is the content tabular data? If it is, use a table, if it isn't, CSS might be more flexible. If you need the row DIVs that Roger uses to have the same height as the highest cell DIV (for example to set a background colour) you also need to float them to the left and give them a width. HTH -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] making rows line up - tables or css?
On 24/05/06, Christian Heilmann [EMAIL PROTECTED] wrote: I am trying to create a page that isn't going to have the same height content in each row, but needs to line up like this: A B A C D D E F G H G H Off the top of my head, I'd do something like this. Since I don't know what the content is, I'm using generic elements div id=row1 #row2, #row3, #row4 { clear: left; } ...also remember it's not just a question of whether tables or css are easier to achieve this. Tables used in this way do not indicate the semantic structure of your document and compromise accessibilty, ease of maintenance, flexibililty and futureproofing, so much better to learn the css way now and you will be at a real advantage later, as well as doing things correctly! -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon! __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] making rows line up - tables or css?
A B A C D D Mike, what type of content are you presenting? Ideally your choice of markup ought to be driven by the semantic content of your material. You'll be able to create the presentation you're looking for with tables, definition lists, and other markup; it all depends on what's right for the material. The content is donor level information. So, it's just blocks of text w/ varied heights arranged as described above. Is it really table data? I'm not quite sure. That's why I wasn't sure if a table is appropriate or not. thanks, Mike __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] making rows line up - tables or css?
The content is donor level information. So, it's just blocks of text w/ varied heights arranged as described above. Is it really table data? I'm not quite sure. That's why I wasn't sure if a table is appropriate or not. Watch out - I asked a very similar question only a few days ago and got mauled by a list admin for asking what was considered an off-topic question. That said... I too would like to know what people consider the criteria for table vs. css usage... With some less-obvious examples. To me, if the data is truly blocks of related data that one might see in a spreadsheet, that seems to be a good case for using regular html tables. But a few examples from the more experienced list members, where they might have used tables, would probably put the question to rest. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] making rows line up - tables or css?
That said... I too would like to know what people consider the criteria for table vs. css usage... With some less-obvious examples. To me, if the data is truly blocks of related data that one might see in a spreadsheet, that seems to be a good case for using regular html tables. But a few examples from the more experienced list members, where they might have used tables, would probably put the question to rest. Well, this kinda brings up an interesting discussion - simulating markup. If I were to use css to create a row/column structure, then I would be simulating markup which is seems to be frowned upon. By using a table structure, yeah, it's using it for layout, but the type of layout that a table is meant to be used for, organized row/column information. I guess I kinda answered my question... unless someone has some better suggestions... thanks, Mike __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] making rows line up - tables or css?
On 5/23/06, Mike Soultanian [EMAIL PROTECTED] wrote: I am trying to create a page that isn't going to have the same height content in each row, but needs to line up like this: A B A C D D E F G H G H Is there a reasonably easy way to do this with CSS. Is this better suited to tables? It's quite easy to do with CSS if you understand floats and clearing floats. Basicly you just have a two column page repeated several times. But if you are used to tables you might find it more than you can easily handle. It requires thinking in a whole different way and that's not easy. -- Ed Seedhouse __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] making rows line up - tables or css?
Mike, On May 23, 2006, at 9:00 PM, Mike Soultanian wrote: I am trying to create a page that isn't going to have the same height content in each row, but needs to line up like this: A B A C D D E F G H G H Off the top of my head, I'd do something like this. Since I don't know what the content is, I'm using generic elements -- html div id=row1 div class=c1/div div class=c2B/div /div div id=row2 div class=dcC/div divDD/div /div div id=row3 div class=c1E/div div class=c2F/div /div div id=row4 div class=c1GG/div div class=c2HH/div /div --- css -- .c1 { float: left; width: 49%; margin-right: 1%; } .c2 { float: left; width: 49%; margin-left: 1%; } .dc { float: left; } #row2, #row3, #row4 { clear: left; } hth -- Roger Roelofs Remember, if you’re headed in the wrong direction, God allows U-turns! ~Allison Gappa Bottke __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/