This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > November 2005 > Turning Off CSS
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| ctiggerf 2005-11-22, 7:16 pm |
| Is there a simple way to quickly turn off all css styles for a section
of a page.
For example I am writting an email app and I want to be able to
preview what I've entered so I can see what it the email will
tentativly look like b4 I send it out to 200 people.
I have the preview there in a cell on the page but it takes the
properties in the stylesheet ... the stylesheet won't be there in the
email so what they are seeing may or may not be what it will look like.
There's got to be a simple way to turn off the styles for just one cell
in a table or a div or something. I know you guys will know the
answer.
Thanks in advance,
Chris
| |
| Jukka K. Korpela 2005-11-22, 7:16 pm |
| "ctiggerf" <ctiggerf@XXXXXXXXXX> wrote:
> Is there a simple way to quickly turn off all css styles for a section
> of a page.
There is none.
> For example I am writting an email app and I want to be able to
> preview what I've entered so I can see what it the email will
> tentativly look like b4 I send it out to 200 people.
How does this relate to using CSS in authoring for the WWW?
> I have the preview there in a cell on the page but it takes the
> properties in the stylesheet ... the stylesheet won't be there in the
> email so what they are seeing may or may not be what it will look like.
Presumably you are using a web browser somehow for the purpose of composing
an E-mail message, using some software that you don't even describe, still
less illustrate with a URL. Are we supposed to guess what you are really
trying to accomplish and in which environment?
> There's got to be a simple way to turn off the styles for just one cell
> in a table or a div or something. I know you guys will know the
> answer.
We know there isn't, but we don't know what your real question is.
Depending on exactly how you construct the E-mail message, you might be able
to display it in an <iframe> element in a table cell, or whatever. Then it
would not be part of the page but rendered as an independent document.
P.S. You are apparently sending HTML or XML E-mail (otherwise you would not
worry about CSS). Most probably, you haven't considered the implications
(such as having your E-mail treated as spam).
--
Yucca, http://www.cs.tut.fi/~jkorpela/
| |
| Gus Richter 2005-11-22, 7:16 pm |
| ctiggerf wrote:
> Is there a simple way to quickly turn off all css styles for a section
> of a page.
>
> For example I am writting an email app and I want to be able to
> preview what I've entered so I can see what it the email will
> tentativly look like b4 I send it out to 200 people.
>
> I have the preview there in a cell on the page but it takes the
> properties in the stylesheet ... the stylesheet won't be there in the
> email so what they are seeing may or may not be what it will look like.
>
> There's got to be a simple way to turn off the styles for just one cell
> in a table or a div or something. I know you guys will know the
> answer.
>
> Thanks in advance,
> Chris
>
You apparently are using a Mozilla product to create your mail, although
I'm not familiar with the gzip potion in your UA string. You mention that:
"the stylesheet won't be there in the email ..."
I don't know why you say that. It may be that you are using Mozilla
(Thunderbird, or whatever) Compose to create your HTML mail. This
creates your mail using inline styles and that's the reason for what you
say.
In place of using inline styles you "can" use a stylesheet which makes
for a cleaner document. The problem is that Moz Mail does not allow
access to the head section, so the stylesheet ends up in the body
section. Although this is contra-standards, it does work when read by
O/OE and Moz Mail. There are enough contra-standards regarding mail that
this will be just another added 'feature'.
In order to be conforming, however, I have used the "InsertHTML"
extension with Thunderbird (probably also works with Moz Mail) which
gives access to the head section, works very well and is available here:
<http://nic-nac-project.de/~kaosmos/edithtml-en.html>
--
Gus
| |
| Pawel Knapik 2005-11-22, 10:35 pm |
| ctiggerf napisaĆ(a):
> Is there a simple way to quickly turn off all css styles for a section
> of a page.
>
[...]
> There's got to be a simple way to turn off the styles for just one cell
> in a table or a div or something. I know you guys will know the
> answer.
You want to do this on a HTML document inside the browser
window?
Consider this situation:
<style>
body { font-size:3em; }
..someClass { font-size:0.5em; }
</style>
in your HTML you have, say, <div class="someClass"></div>
Now, using JS you can remove the class or css rules for this
class. But then style will be inherited, so you won't be any
bit closer to "unstyled" version of this element.
If the element you want to see unstyled has and id you can
try this:
java script:var
w=window.open('','prev','width=400,height=500'); var
b=w.document.createElement('div');
b.innerHTML=document.getElementById('ELM').innerHTML;
void(w.document.body.appendChild(b));
where ELM is the id of element you want to preview.
Paste the code into your browser's address bar (in one
line), change ELM to the id of element you want to see and
press [enter]. Tested in Firefox, but should work in other
browsers as well.
In fact the contents of preview window won't be unstyled but
will use browser's default stylesheet. You can play with the
JS and change it to generate a window that uses for
example { font: 1em courier, monospace; } but it's not a
topic for this group.
Have fun :)
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|