473,379 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Turning Off CSS

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

Nov 23 '05 #1
3 1604
"ctiggerf" <ct******@gmail.com> 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/
Nov 23 '05 #2
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
Nov 23 '05 #3
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:

javascript:var
w=window.open('','prev','width=400,height=500'); var
b=w.document.createElement('div');
b.innerHTML=document.getElementById('ELM').innerHT ML;
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 :)
Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Leif Wessman | last post by:
From: http://www.php.net/manual/en/function.imagettftext.php "color is the color index. Using the negative of a color index has the effect of turning off antialiasing." I'm using a bundled...
6
by: Peter Otten | last post by:
It's easy to write a function that wraps a generator and provides a callback. E. g.: import os, sys def walk(path, visit): """ Emulate os.path.walk() (simplified) using os.walk()""" for dir,...
7
by: Greg Raven | last post by:
I styled my links just the way I want them using CSS, but now my linked images have picked up these same styles. I've tried turning the styles off for the images with: a img { text-decoration:...
0
by: Winfried Heymann | last post by:
Hi there, I am struggling with a IE 6 glitch (possibly available in earlier versions): If you click on a link which has a background-image and leave this link during loading, IE stops ist...
8
by: dalei | last post by:
The following code does not work. Can anyone help with modifying it? <script type='text/javascript'> function super2 () { var theNum = prompt ('Please enter a number: ', ' ');...
13
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
0
by: Nadav | last post by:
Hi, The Problem: WebPermission.Demand() generate an exception ( meaning security validation has failed ), digging into the code I have stumbled upon the internal class...
2
by: rk325 | last post by:
I have a question about cookies & browser permissions and turning off cookies when creating a web site (cookieless mode in web.config). I have a web site that of course uses Session variables....
8
by: Mark A. Sam | last post by:
Hello I am working locally with Visual Web Developer 2005 Express. Before I even installed it, the information from Microsoft was that you could FTP it to a remote site and it should work. The...
7
by: Kirk McDonald | last post by:
Let's say I have a function that takes a callback function as a parameter, and uses it to describe an iteration: def func(callback): for i in : callback(i) For the sake of argument, assume...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.