[drupal-devel] css clear use

Larry Garfield larry at garfieldtech.com
Sat Oct 1 17:18:53 UTC 2005


On Saturday 01 October 2005 09:55 am, Steven Wittens wrote:

> >I seem to have been able to override it in the theme css file, but aside
> >from it being temporarily annoying to fix, it doesn't seem like I should
> >have to override Drupal built-in css.
>
> It's much better to switch to a layout model that can actually handle
> clears at arbitrary locations:
> http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean
>.html
>
> By encasing each column in a floated div, you structurally separate
> them, and they won't interfere with eachothers clears. This also has the
> benefit of allowing source ordered columns.
>
> Steven Wittens

That's actually what I'm doing that causes a problem. :-)  The general 
structure of the file is: 

<div id="A">
  <div id="B">
  </div>
  <div id="C">
    <div id="D">
    </div>
  </div>
</div>

Float B left, fixed width.  Set D to clear both.  D now clears to below the 
bottom of B, even though B is not in-flow with it inside C.  There are lots 
of places in drupal.css where (for good reasons) D will have a clear set.  
That causes all sorts of badness.

Because the clears in drupal.css make sense, simply removing them or removing 
drupal.css is not always feasible.  That's the problem I've run into, 
although it's not Drupal-specific.  If you've a good solution, please let me 
know. :-)  It's probably something we could document.

-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson



More information about the drupal-devel mailing list