[drupal-devel] css clear use
I'm trying to develop a theme with floating css elements and there are several uses of clear in misc/drupal.css that are messing up my layout. Is there a particular programmatic reason the use of clear is superordinate to themes? 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.
I've run into the same problem. It makes table-free column-based layouts extremely difficult when a div in the main content area clears to below the bottom of the left nav bar (itself a float-left div). Why it should I don't know, but it drives me batty. :-) Is there a better way of handling it, or some work-around? On Friday 30 September 2005 04:01 pm, David Norman wrote:
I'm trying to develop a theme with floating css elements and there are several uses of clear in misc/drupal.css that are messing up my layout. Is there a particular programmatic reason the use of clear is superordinate to themes?
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.
-- Larry Garfield AIM: LOLG42 larry@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
David Norman schrieb:
I'm trying to develop a theme with floating css elements and there are several uses of clear in misc/drupal.css that are messing up my layout. Is there a particular programmatic reason the use of clear is superordinate to themes?
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.
If you are good in CSS and HTML it would be fine if you could review every style declaration made in drupal.css to simplify it. Sometimes they should probably be moved to the themes style sheet... Then you could post some issues (maybe for every major step one) here (http://drupal.org/project/issues/3060) CU tobias
I'm trying to develop a theme with floating css elements and there are several uses of clear in misc/drupal.css that are messing up my layout. Is there a particular programmatic reason the use of clear is superordinate to themes?
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.... 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
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@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
participants (5)
-
David Norman -
Karoly Negyesi -
Larry Garfield -
Steven Wittens -
Tobias Maier