469,353 Members | 2,121 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,353 developers. It's quick & easy.

style to remove all styles

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 {backgro...}
DIV P{font-f...}
....
..removeStyles{styles:clear}

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

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

TIA

Chandy
Jul 23 '05 #1
9 46184
Chandy <ch****@totalise.co.uk> 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?


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

--
David Håsäther
Jul 23 '05 #2
ch****@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{styles:clear}


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

Jul 23 '05 #3
me
"Chandy" <ch****@totalise.co.uk> wrote in message
news:5a**************************@posting.google.c om...
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 {backgro...}
DIV P{font-f...}
...
.removeStyles{styles:clear}

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

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

TIA

Chandy

Jul 23 '05 #4
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++)
{void(document.styleSheets.item(i).disabled=true); }
el=document.getElementsByTagName('*');
for(i=0;i<el.length;i++)
{void(el[i].style.cssText='');}

--

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/>.
Jul 23 '05 #5
David Ross wrote:
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.


Why an extension? Firefox has Tools --> Page Style --> No Style, though
I preferred versions < 1.x which had a stylesheet switcher in the lower
left-hand corner.

Mozilla not have the same thing? Seems strange.
Jul 23 '05 #6
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?


Next time, please ask CSS related questions in a CSS related group.
However, these articles may help you to understand how to achieve the
desired effect.

http://tantek.com/log/2004/09.html#d06t2354
http://meyerweb.com/eric/thoughts/20...ndoing-htmlcss

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #7
"Peter1968" wrote in comp.infosystems.www.authoring.html:
Firefox has Tools --> Page Style --> No Style, though
I preferred versions < 1.x which had a stylesheet switcher in the lower
left-hand corner.

Mozilla not have the same thing? Seems strange.


It's View -> Use Style, but "no style" isn't an option. I wonder
what would happen if I had a user stylesheet with no styles in my
Chrome directory, whether that one would then be an option in View
-> Use Style.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 23 '05 #8
Peter1968 wrote:
David Ross wrote:
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.
Why an extension? Firefox has Tools --> Page Style --> No Style, though
I preferred versions < 1.x which had a stylesheet switcher in the lower
left-hand corner.


Why not the Web Developer extension? Lots of tools; if you've not
checked it out, you might find it interesting.

--
Blinky Linux Registered User 297263
Who has implemented Usenet Solution #45933:
Now killing all posts originating at Google Groups

Jul 23 '05 #9

Why an extension? Firefox has Tools --> Page Style --> No Style, though


Make that View --> Page Style --> No Style.
My mistake.
Jul 23 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jerry Camel | last post: by
6 posts views Thread by Tim Cartwright | last post: by
6 posts views Thread by scorpion53061 | last post: by
3 posts views Thread by Dave Hughes | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.