Click here to get back home

style to remove all styles

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
style to remove all styles Chandy 03-25-2005
Get Chitika Premium
Posted by Chandy on March 25, 2005, 5:09 am
Please log in for more thread options


Hi,

Is there any way to apply a style that will effectively block the
application of any applied or inherited styles for that object and any
contained objects?

E.g.,

CSS:
P
DIV P
....
..removeStyles

HTML:
<div class="removeStyles">
<p>No styles on this!</p>
</div>

Setting the style for .removeStyles to {} does not do it.

TIA

Chandy


Posted by me on March 25, 2005, 10:50 am
Please log in for more thread options


> Hi,
> Is there any way to apply a style that will effectively block the
> application of any applied or inherited styles for that object...

Yes, by applying a new style of your choice that overriddes the existing
style.

> ...and any
> contained objects?

If I understand your definition of contained objects then to the best of my
knowledge the answer is no.

Lets say you applied a style to all divs on your page. Then you apply an
override style to a particuliar div. If you then insert a new div within
that div it will inherit the style that was originally applied to all divs
and ignore the style of the div it is contained within. Clear as mud right?
Signed,
me

> E.g.,
>
> CSS:
> P
> DIV P
> ...
> .removeStyles
>
> HTML:
> <div class="removeStyles">
> <p>No styles on this!</p>
> </div>
>
> Setting the style for .removeStyles to {} does not do it.
>
> TIA
>
> Chandy




Posted by David Håsäther on March 25, 2005, 2:35 pm
Please log in for more thread options



> Hi,
>
> Is there any way to apply a style that will effectively block the
> application of any applied or inherited styles for that object and
> any contained objects?

No. (I've thought about this feature too actually).

--
David Håsäther


Posted by Jukka K. Korpela on March 25, 2005, 2:59 pm
Please log in for more thread options


chandy@totalise.co.uk (Chandy) wrote:

> Is there any way to apply a style that will effectively block the
> application of any applied or inherited styles for that object and
> any contained objects?

No. And it wouldn't be HTML. It would be CSS, which is discussed in our
sister group c.w.i.a.stylesheets.

> .removeStyles

You really need to read a tutorial on CSS first. You can't just invent
constructs as you go and expect browsers to read your mind.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html



Posted by David Ross on March 25, 2005, 4:51 pm
Please log in for more thread options


Chandy wrote:
>
> Hi,
>
> Is there any way to apply a style that will effectively block the
> application of any applied or inherited styles for that object and any
> contained objects?

        [example snipped]

I have a toolbar button on my Mozilla browser (via the PrefBar
extension) that eliminates all CSS from the current Web page that
I'm viewing. This is very handy when I want to test one of my own
Web pages to see how it might look on a browser that does not have
CSS support. To restore CSS for the affected page, I merely reload
the page.

Behind that button is the following script:
javascript:
for(i=0;i<document.styleSheets.length;i++)
        
el=document.getElementsByTagName('*');
for(i=0;i<el.length;i++)
        

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.


Similar ThreadsPosted
tidy ms word output as pure xhtml without css style and font styles July 10, 2007, 5:10 am
XHTML DOCTYPE breaks JavaScript x.style.top and x.style.left? July 5, 2005, 12:58 pm
Help with styles and hot links April 4, 2006, 11:36 am
text box styles in a mac enviroment May 18, 2005, 9:32 am
width and height styles on tag June 29, 2005, 3:37 pm
Apply multiple css styles to a textfield? April 25, 2005, 5:05 pm
multiple link styles without classes? May 20, 2005, 3:21 pm
CSS styles not working for anchor tags. August 13, 2005, 4:03 pm
Persistent, default and alternate styles December 21, 2005, 11:40 am
DHTML/js set text content w/ styles January 30, 2006, 5:19 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap