Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 24th, 2005, 12:56 AM
Chandy
Guest
 
Posts: n/a
Default 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
  #2  
Old July 24th, 2005, 12:56 AM
David Håsäther
Guest
 
Posts: n/a
Default Re: style to remove all styles

Chandy <chandy@totalise.co.uk> wrote:
[color=blue]
> 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?[/color]

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

--
David Håsäther
  #3  
Old July 24th, 2005, 12:56 AM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: style to remove all styles

chandy@totalise.co.uk (Chandy) wrote:
[color=blue]
> 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?[/color]

No. And it wouldn't be HTML. It would be CSS, which is discussed in our
sister group c.w.i.a.stylesheets.
[color=blue]
> .removeStyles{styles:clear}[/color]

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

  #4  
Old July 24th, 2005, 12:56 AM
me
Guest
 
Posts: n/a
Default Re: style to remove all styles

"Chandy" <chandy@totalise.co.uk> wrote in message
news:5af0375a.0503250409.69a13e27@posting.google.c om...[color=blue]
> Hi,
> Is there any way to apply a style that will effectively block the
> application of any applied or inherited styles for that object...[/color]

Yes, by applying a new style of your choice that overriddes the existing
style.
[color=blue]
> ...and any
> contained objects?[/color]

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
[color=blue]
> 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[/color]


  #5  
Old July 24th, 2005, 12:57 AM
David Ross
Guest
 
Posts: n/a
Default Re: style to remove all styles

Chandy wrote:[color=blue]
>
> 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?[/color]

[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/>.
  #6  
Old July 24th, 2005, 12:57 AM
Peter1968
Guest
 
Posts: n/a
Default Re: style to remove all styles

David Ross wrote:[color=blue]
> Chandy wrote:
>[color=green]
>>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?[/color]
>
>
> [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.
>[/color]

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.
  #7  
Old July 24th, 2005, 12:57 AM
Lachlan Hunt
Guest
 
Posts: n/a
Default Re: style to remove all styles

Chandy wrote:[color=blue]
> 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?[/color]

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
  #8  
Old July 24th, 2005, 12:57 AM
Stan Brown
Guest
 
Posts: n/a
Default Re: style to remove all styles

"Peter1968" wrote in comp.infosystems.www.authoring.html:[color=blue]
>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.[/color]

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/
  #9  
Old July 24th, 2005, 12:57 AM
Blinky the Shark
Guest
 
Posts: n/a
Default Re: style to remove all styles

Peter1968 wrote:[color=blue]
> David Ross wrote:[color=green]
>> Chandy wrote:[/color][/color]
[color=blue][color=green][color=darkred]
>>>Hi,[/color][/color][/color]
[color=blue][color=green][color=darkred]
>>>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?[/color][/color][/color]

[color=blue][color=green]
>> [example snipped][/color][/color]
[color=blue][color=green]
>> 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.[/color][/color]
[color=blue]
> 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.[/color]

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

  #10  
Old July 24th, 2005, 12:57 AM
Peter1968
Guest
 
Posts: n/a
Default Re: style to remove all styles

[color=blue]
>
> Why an extension? Firefox has Tools --> Page Style --> No Style, though[/color]

Make that View --> Page Style --> No Style.
My mistake.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles