francky,

If we had total control over the page I would completely agree with your
solution.  In this case, we are creating a portlet to plug into our
portal.  The content that we are producing to plug into the portal
layout is several levels deep and very difficult (almost impossible) to
isolate with this method.

...portals create some of the oddest UI issues...

-Scott


-----Original Message-----
From: francky [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 8:28 AM
To: Scott Andrews
Cc: css-d@lists.css-discuss.org
Subject: Re: [css-d] Disable CSS for a page fragment

Hi Scott,
As said before, I think an Iframe can be a good solution.
Probably another solution could be almost the same as your description; 
but only the opposite way of thinking. :-)
What I mean is this.
What you have now will be some kind of:

p, h1, h2 {margin:0; padding: 0;}
#menu { ...position, colors, borders, backgrounds...}
#menu li { ...position, colors, borders, backgrounds...}
#content { ...styles...}
and so on.
  

The new model can be:

<body>
<div id="wrapper1">
   ... al the containing site stuff before 
   the embedded message has to be displayed ...
</div>
<div id="messagecontainer">
   ... the embedded message ...
</div>
<div id="wrapper2">
   ... al the containing site stuff after 
   the embedded message has to be displayed ...
</div>
</body>
  

Then in the css you can place the wrapper-selector before all existing 
styles for the containing site stuff, like:

#wrapper1 p, #wrapper1 h1, #wrapper1 h2 {margin:0; padding: 0;}
#wrapper1 #menu { ...position, colors, borders, backgrounds...}
#wrapper1 #menu li { ...position, colors, borders, backgrounds...}
#wrapper1 #content { ...styles...}
and the same for #wrapper2
  

In your model the surrounding styles are the "normal styles", and the 
messages are the exceptions, to make a solution for. - Now this is 
mirrorred: the messages have the default styles (or can have particular 
message styles), and the wrappers for the main page are the "exceptions"

with an own style apart from the message styles. I guess it will work as

long as there are no overlapping class names or ID names in both. To 
avoid this, you can give your 2 wrappers a "password" like  
id="wrapper1abracadabra1563" or id="wrapper2butnot4u". Should be quite a

coincidence if somebody is using exactly the same ID's in his message 
[1]. Then even a simple <b>...</b> can have a different meaning inside 
or outside the message. :-)

Succes and greetings,
francky

[1]
Or deliberately by studying your source code and copying the passwords 
into the message styles. - But then he/she shouldn't be wondering why 
his/her message has a strange layout! ;-)





______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to