![]() | |
![]() |
| | Thread Tools | Display Modes |
#41
| ||||||
| ||||||
|
|
In article <slrnh3lbbu.32l.spamspam (AT) bowser (DOT) marioworld>, Ben C <spamspam (AT) spam (DOT) eggs> wrote: 1. Background images with repeat-y pretending to be column backgrounds. 2. Borders pretending to be column backgrounds. 3. Absolute positioning and z-index. 4. display: table-cell. 5. dorayme-style nesting (but you need to be able to rank the columns in order of height) 1. It is so simple for some situations that it feels daft not using it. The desire not to do it on some sort of purist grounds is fair enough |
|
but I notice that Matthew Taylor rather over-eggs the pudding: "Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and XHTML?" One of the attractive features of this technique is how very tiny the images need be, the repeat-y is just CSS. 2. I think you disapproved of this one a long while back. Seemed fair comment but I rather like it because it is so nicely counterintuitive yet solid enough. <g |
|
3. Seems a solid technique. As with many of these tableless column techniques extra divs are required, something that I guess many of us feel slightly compromised by in a rush from simple tables. |
|
4. I have no comment on this at all. I merely weep and wish. |
|
6. Let's stick in HTML tables as a sixth even though the 5 you mention are meant as alternatives to HTML tables. The biggest thing against tables for columns - I am talking here just 3 cells and one row and nothing else at all - is not the harder construction or ease of update, it is a complete myth that these are real factors. Rather, the arguments about adaptability to different viewing platforms or human non-visual modalities. And perhaps arguments concerning search engine advantages. |
|
It is not surprising how natural the desire for columning is. Perhaps, the cross browser difficulties of it without tables should encourage more of us to become less dependent on columns in the first place. You know, "stop wanting them!". Out of adversity... |
#42
| |||
| |||
|
|
here are final versions: http://www.mayacove.com/dev/devlper_test/test.html |
#43
| |||
| |||
|
|
On 2009-06-18, maya <maya778899 (AT) yahoo (DOT) com> wrote: [...] here are final versions: http://www.mayacove.com/dev/devlper_test/test.html Add this CSS: #wrapper { position: relative; z-index: 0; } .background { position: absolute; top: 0; bottom: 0; z-index: -1; } #leftbar_bg { background: #FFFF00; left: 0; width: 250px; } #content_bg { background: #00CC00; left: 250px; width: 460px; } #right_bg { background: #CC33CC; right: 0; width: 250px } |
|
And these divs: div id="leftbar_bg" class="background"></div div id="content_bg" class="background"></div div id="rightbar_bg" class="background"></div Put each div as the first thing inside the #leftbar, #content and #rightbar divs respectively. The important reason why this works is as follows: .background has bottom: 0, which means it stretches all the way to the bottom of its container. The container for all three background divs is #wrapper, because it is the nearest positioned ancestor (that's why it's position: relative). #wrapper's height is given by its contents, i.e. determined by the height of the tallest column. We give #wrapper z-index: 0 to make it start a stacking context, and .background z-index: -1 to put the backgrounds at the back of that stacking context. This means the backgrounds will be stacked right at the back of #wrapper, but on top of anything #wrapper is supposed to be on top of, i.e., where they belong. If you were a purist, you could try inserting the background divs with :before, but that would only work in some browsers (possibly not even in Firefox). Good luck! |
#44
| |||||
| |||||
|
|
On 2009-06-19, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: In article <slrnh3lbbu.32l.spamspam (AT) bowser (DOT) marioworld>, Ben C <spamspam (AT) spam (DOT) eggs> wrote: 1. Background images with repeat-y pretending to be column backgrounds. 2. Borders pretending to be column backgrounds. 3. Absolute positioning and z-index. 4. display: table-cell. 5. dorayme-style nesting (but you need to be able to rank the columns in order of height) 1. It is so simple for some situations that it feels daft not using it. The desire not to do it on some sort of purist grounds is fair enough If someone's both a purist and a web-author I would suggest they're in the wrong job. |
|
but I notice that Matthew Taylor rather over-eggs the pudding: "Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and XHTML?" One of the attractive features of this technique is how very tiny the images need be, the repeat-y is just CSS. 2. I think you disapproved of this one a long while back. Seemed fair comment but I rather like it because it is so nicely counterintuitive yet solid enough. <g I don't like it because it's too clever. 3. Seems a solid technique. As with many of these tableless column techniques extra divs are required, something that I guess many of us feel slightly compromised by in a rush from simple tables. 3 is to me the obvious way to do it. |
|
4. I have no comment on this at all. I merely weep and wish. This reminds me: you can also do columns with inline-blocks. But it doesn't solve the equal-height problem. |
|
[...] 6. Let's stick in HTML tables as a sixth even though the 5 you mention are meant as alternatives to HTML tables. The biggest thing against tables for columns - I am talking here just 3 cells and one row and nothing else at all - is not the harder construction or ease of update, it is a complete myth that these are real factors. Rather, the arguments about adaptability to different viewing platforms or human non-visual modalities. And perhaps arguments concerning search engine advantages. Yes, although none of these arguments are really very convincing, which is why I originally ranked "just use a table" quite high. It is not surprising how natural the desire for columning is. Perhaps, the cross browser difficulties of it without tables should encourage more of us to become less dependent on columns in the first place. You know, "stop wanting them!". Out of adversity... |
|
There are some new things proposed for CSS3 to make these 3-column layouts quite a bit easier. |
#45
| |||
| |||
|
|
On 2009-06-18, maya <maya778899 (AT) yahoo (DOT) com> wrote: [...] here are final versions: http://www.mayacove.com/dev/devlper_test/test.html |

#46
| |||
| |||
|
|
well guys, whaddayaknow.. I just got a phone call from them.. have an interview Tue morning.... ![]() he said he knew the only way to do it was with img-bg's.. |
#47
| |||
| |||
|
|
Ben C wrote: On 2009-06-18, maya <maya778899 (AT) yahoo (DOT) com> wrote: [...] here are final versions: http://www.mayacove.com/dev/devlper_test/test.html well guys, whaddayaknow.. I just got a phone call from them.. have an interview Tue morning.... ![]() he said he knew the only way to do it was with img-bg's.. [...] |
#48
| |||
| |||
|
|
On 2009-06-19, maya <maya778899 (AT) yahoo (DOT) com> wrote: Ben C wrote: On 2009-06-18, maya <maya778899 (AT) yahoo (DOT) com> wrote: [...] here are final versions: http://www.mayacove.com/dev/devlper_test/test.html well guys, whaddayaknow.. I just got a phone call from them.. have an interview Tue morning.... ![]() he said he knew the only way to do it was with img-bg's.. [...] Evidently your future employers don't read c.i.w.a.s. or they'd know about the 5 or 6 other ways of doing it we've just been discussing ![]() |
#49
| |||
| |||
|
|
Ben C wrote: On 2009-06-19, maya <maya778899 (AT) yahoo (DOT) com> wrote: Ben C wrote: On 2009-06-18, maya <maya778899 (AT) yahoo (DOT) com> wrote: [...] here are final versions: http://www.mayacove.com/dev/devlper_test/test.html well guys, whaddayaknow.. I just got a phone call from them.. have an interview Tue morning.... ![]() he said he knew the only way to do it was with img-bg's.. [...] Evidently your future employers don't read c.i.w.a.s. or they'd know about the 5 or 6 other ways of doing it we've just been discussing ![]() Perhaps they do. I have to check the other 3 or 4 (will check the thread in a day or two when time allows), but keeping cross-browser in mind, your last example of .background abs positioned with top/bottom set to zero works great (thank you for this) with Fx and the like, but does not with IE6 (+?). |
#50
| |||
| |||
|
|
Ben C wrote: On 2009-06-18, maya <maya778899 (AT) yahoo (DOT) com> wrote: [...] here are final versions: http://www.mayacove.com/dev/devlper_test/test.html Add this CSS: #wrapper { position: relative; z-index: 0; } .background { position: absolute; top: 0; bottom: 0; z-index: -1; } #leftbar_bg { background: #FFFF00; left: 0; width: 250px; } #content_bg { background: #00CC00; left: 250px; width: 460px; } #right_bg { background: #CC33CC; right: 0; width: 250px } It never occurred to me that you could position background colors like background images. It's obvious now and quick imaginative thinking on Ben's part. |
![]() |
| Thread Tools | |
| Display Modes | |
| |