[thelist] Hiding CSS from everything but IE6/Win?

Boris Mann boris at bmannconsulting.com
Sat Aug 9 21:38:04 CDT 2003


The short story is that I think I need a way to hide one bit of CSS 
from everything *except* for IE6/Win.

I just did a bit of an overhaul of my personal site. I'm using Drupal 
[1] as the backend, and modified a "tableless" theme (I confess...I 
changed the header into a table to get it looking like I want).

I also implemented a JavaScript stylesheet switcher from ALA [2]. 
Everything works pretty good, except that for IE6/Win, I can either 
have all the left-nav stylesheets work (default, lucida, and ie5mac) or 
only the right-nav stylesheet.

I have all the main CSS in one file, called base.css. The alternate 
stylesheets work by first importing this file, then overriding parts of 
it. Here are the positional parts from the base:

#blocks {
	position: absolute;
	left: 10px; /* needed by IE6/Win */
	width: 175px;
	padding-right: 1px;

#main {
	margin-left: 185px;

For the case where I want the positions switched, the rightnav.css 
stylesheet looks like this:

#blocks {
	position: absolute;
	right: 10px; /* IE6/Win doesn't react to this -- it's already seen 
left: 10px and positions the div there */
	width: 175px;
	padding-left: 1px;

#main {
	margin-left: 0px;
	margin-right: 185px;

Any tips would be appreciated. My site is http://www.bmannconsulting.com

[1] Drupal: http://www.drupal.org
[2] A List Apart - Alternate Stylesheets: 

Boris Mann

More information about the thelist mailing list