WebDeveloper.com

WebDeveloper.com (http://www.webdeveloper.com/forum/index.php)
-   CSS (http://www.webdeveloper.com/forum/forumdisplay.php?f=7)
-   -   Challenge: old 2 column layout still unbeaten by CSS (http://www.webdeveloper.com/forum/showthread.php?t=41878)

HataruMendo 08-15-2004 10:21 PM

Challenge: old 2 column layout still unbeaten by CSS
 
Hi all,

I've been trying hard but I can't figure out this one:

I have two pieces of HTML content inside a container DIV: the first block is short, the second one is LONG.
They must stay up as two columns (the long block can't wrap under the short one), but NO assumptions on contents of block #1 or #2 can be made: no width values can be chosen.

The intended layout is something like:


┌───────────────────────────┐
│ External container        │
│ ┌───────┐┌──────────────┐ │
│ │Block 1││ Block 2      │ │
│ └───────┘│ Both widths  │ │
│          │ are UNKNOWN  │ │
│          └──────────────┘ │
└───────────────────────────┘



i.e. I want to reuse this code in a variety of situations (where I can't foresee how much content will be on either one but they still must fit two columns) so I can't use a silly solution like 'set margin of block X to be wider than block Y and make it float'. Remember: we have NO IDEA of what block 1 or 2 width may be set to.

Any ideas?

TIA,
Hataru Mendo

Robert Wellock 08-16-2004 08:53 AM

If you cannot apply a width then it's practically impossible since it's imperative that a div use a width even if inherited or as a percentage.


All times are GMT -5. The time now is 08:41 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.