473,473 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I change the value in a css class?

How can I change the value in a css class?

For instance, with I.E., I want to change the value in the class
span.arr from middle to 0.2em. The value of middle is OK for most
other browsers.

I expected the code below to work but I.E. does not like it.

What should I be doing?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1">
<title>Chemical Formula Display</title>
<style type="text/css"><!--
body {font-size: 12pt}
p, ol {font-size: 12pt; margin-top: 0.2em; margin-bottom: 0.4em}
h1 {font-size: 18pt}
sub {vertical-align: bottom; font-size: 9pt}
sup {vertical-align: top; font-size: 9pt}
span.arr {vertical-align: middle;}
-->
</style>
<script type="text/javascript"><!--
if (navigator.appName == "Microsoft Internet Explorer")
changeStyle("span.arr", '0.2em')
else
changeStyle("span.arr", 'middle');

function changeStyle(classNme, newContent)
{
var ssheet = document.styleSheets[0];
var ruleList = (typeof ssheet.cssRules != "undefined") ?
ssheet.cssRules : ((typeof ssheet.rules != "undefined") ? ssheet.rules
: null );
if (ruleList)
for (var i = 0; i < ruleList.length; i++)
{
if (ruleList[i].selectorText.toLowerCase() == classNme)
{
ruleList[i].style.vertical-align = newContent;
break;
}
}
}
// -->
</script>
</head>
<body style="text-justify-trim:punctuation" lang="EN-GB">
<h1>Chemical Formula Display</h1>
<p>Netscape requires the arrows to be vertically aligned in
the 'middle' but I.E. wants them to be aligned at 0.2em</p>
<p>(I) H<sub>2</sub>SO<sub>4</sub> + Zn <span
class="arr">&hArr;</span> ZnSO<sub>4</sub> + H<sub>2</sub></p>
<p>(I) H<sub>2</sub>SO<sub>4</sub> + Zn <span
class="arr">&rarr;</span> ZnSO<sub>4</sub> + H<sub>2</sub></p>
<p style="margin-top=4em"></p>
</body>
</html>
Oct 18 '05 #1
23 2259
On Tue, 18 Oct 2005 09:04:24 GMT, Harry Haller <Ha***@Steppenwolf.com>
wrote:
How can I change the value in a css class?

For instance, with I.E., I want to change the value in the class
span.arr from middle to 0.2em. The value of middle is OK for most
other browsers.

I expected the code below to work but I.E. does not like it.

What should I be doing?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1">
<title>Chemical Formula Display</title>
<style type="text/css"><!--
body {font-size: 12pt}
p, ol {font-size: 12pt; margin-top: 0.2em; margin-bottom: 0.4em}
h1 {font-size: 18pt}
sub {vertical-align: bottom; font-size: 9pt}
sup {vertical-align: top; font-size: 9pt}
span.arr {vertical-align: middle;}
-->
</style>
<script type="text/javascript"><!--
if (navigator.appName == "Microsoft Internet Explorer")
changeStyle("span.arr", '0.2em')
else
changeStyle("span.arr", 'middle');

function changeStyle(classNme, newContent)
{
var ssheet = document.styleSheets[0];
var ruleList = (typeof ssheet.cssRules != "undefined") ?
ssheet.cssRules : ((typeof ssheet.rules != "undefined") ? ssheet.rules
: null );
if (ruleList)
for (var i = 0; i < ruleList.length; i++)
{
if (ruleList[i].selectorText.toLowerCase() == classNme)
{
ruleList[i].style.vertical-align = newContent;
break;
}
}
}
// -->
</script>
</head>
<body style="text-justify-trim:punctuation" lang="EN-GB">
<h1>Chemical Formula Display</h1>
<p>Netscape requires the arrows to be vertically aligned in
the 'middle' but I.E. wants them to be aligned at 0.2em</p>
<p>(I) H<sub>2</sub>SO<sub>4</sub> + Zn <span
class="arr">&hArr;</span> ZnSO<sub>4</sub> + H<sub>2</sub></p>
<p>(I) H<sub>2</sub>SO<sub>4</sub> + Zn <span
class="arr">&rarr;</span> ZnSO<sub>4</sub> + H<sub>2</sub></p>
<p style="margin-top=4em"></p>
</body>
</html>


Sorry, I just noticed it should be:
ruleList[i].style.verticalAlign = newContent;
not
ruleList[i].style.vertical-align = newContent;

Apart from that I have changed all the styles to end with a ;

It works now.
Oct 18 '05 #2
Harry Haller wrote:
How can I change the value in a css class?

For instance, with I.E., I want to change the value in the class
span.arr from middle to 0.2em. The value of middle is OK for most
other browsers.

I expected the code below to work but I.E. does not like it.

What should I be doing?


Ask in a CSS forum, I suspect there is a pure CSS solution. Any
browser-sniffing method is bound to fail at least some of the time for
some browsers.
comp.infosystems.www.authoring.stylesheets

--
Rob
Oct 18 '05 #3
You can use conditional comments at IE.

Example HTML:
<head>
<style type="text/css"><!--
span.arr {vertical-align: middle;}
--></style>
<!--[if IE]>
<style type="text/css">
span.arr {vertical-align: 0.2em;}
</style>
< ![endif]-->
</head>

This is valid HTML.

Oct 18 '05 #4
Harry Haller wrote:
How can I change the value in a css class?

For instance, with I.E., I want to change the value in the class
span.arr from middle to 0.2em. The value of middle is OK for most
other browsers.
Have you decided on a solution without really considering the actual
problem?
What should I be doing?
We can tell you, but you might not like it. ;)
<style type="text/css"><!--
Dump the <!-- --> comment tags. They haven't been needed for more than
10 years now.

BTW, it is accepted practice to post the URL of a page showing the
problem. Most people don't want to be bothered to copy and paste your
code and dummy up their own page. Besides, more often than not, the code
alone doesn't tell the whole story.

Make it easy for people to help you and you'll get better results.
body {font-size: 12pt}
If this were a print stylesheet, setting font sizes in pt units could be
acceptable. They are unsuitable for screen display, though. Use % per
published accessiblity guidelines, with body at 100%. Subscripts and
superscripts can be a fraction of that, maybe 75%.
span.arr {vertical-align: middle;}

<p>(I) H<sub>2</sub>SO<sub>4</sub> + Zn <span
class="arr">&hArr;</span> ZnSO<sub>4</sub> + H<sub>2</sub></p>


Seems to me that arrows vertically align by themselves just fine. Why do
you need to specifically set it at all?

BTW, you might want to check out the line-height property.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Oct 18 '05 #5
Once upon a time *Gomolyako Eduard* wrote:
You can use conditional comments at IE.


Who?

For furter ref on how to post on usenet, please read the links in my sig!

--
/Arne
Now killing all top posters and posters who don't quote
* How to post: http://www.cs.tut.fi/~jkorpela/usenet/brox.html
* From Google: http://www.safalra.com/special/googlegroupsreply/
-------------------------------------------------------------
Oct 18 '05 #6
Taked into consideration.

Arne писал(а):
Once upon a time *Gomolyako Eduard* wrote:
You can use conditional comments at IE.


Who?

For furter ref on how to post on usenet, please read the links in my sig!

--
/Arne
Now killing all top posters and posters who don't quote
* How to post: http://www.cs.tut.fi/~jkorpela/usenet/brox.html
* From Google: http://www.safalra.com/special/googlegroupsreply/
-------------------------------------------------------------


Oct 18 '05 #7
kchayka wrote:
Harry Haller wrote:
<style type="text/css"><!--


Dump the <!-- --> comment tags. They haven't been needed for more than
10 years now.


1. They are NOT "comment tags".ss

2. Your statement applies to _`script'_ elements. JavaScript within HTML
has been around since 1994 (NN2).

HTML 4 and CSS have been around since 1999, it is not that unlikely that
there is an installed user agent that does not understand the `style'
element (properly). Since those comments do no harm in HTML (they are
specified in the CSS grammars in contrast to the JS specs) it is
perfectly valid to use them.
X-Post & F'up2 comp.infosystems.www.authoring.html

PointedEars
--
The German psychs, the German authorities, the German secret service agents
are [...] fanatics, they are insane and known of persecuting innocent people
and Scientologists. -- "The only real Barbara Schwarz", dsw.scientology,
<16**************************@posting.google.com >
Oct 21 '05 #8
Thomas 'PointedEars' Lahn wrote:
kchayka wrote:
Harry Haller wrote:
<style type="text/css"><!-- Dump the <!-- --> comment tags. They haven't been needed for more than
10 years now.


Well, not quite that long, but they are certainly not needed these days.
2. Your statement applies to _`script'_ elements. JavaScript within HTML
has been around since 1994 (NN2).

HTML 4 and CSS have been around since 1999,
CSS1 was first published as a rec in 1996. The script and style
elements have been around since they were introduced as place holders in
HTML 3.2, published in 1997.
it is not that unlikely that there is an installed user agent that does
not understand the `style' element (properly).
Actually, it's highly unlikely any browser that old is still in use.
Since those comments do no harm in HTML... it is perfectly valid to use them.


Well, that's essentially true, but they do harm scripts and styles in
XHTML, though most authors aren't aware of such issues anyway. The
safest and most recommended way is to link to an external stylesheet
instead.

http://lachy.id.au/log/2005/05/script-comments

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Oct 21 '05 #9
On Fri, 21 Oct 2005, Thomas 'PointedEars' Lahn wrote:
kchayka wrote:
Dump the <!-- --> comment tags. They haven't been needed for more than
10 years now.
1. They are NOT "comment tags".ss


Quite right: in HTML/3.2 and later, the content model of <style...>
(and of <script...> is CDATA, so there's no such thing as HTML
comments in them. The character strings <!-- and --> get passed as
data to the underlying software (CSS or JS as the case may be) and
have to be dealt with there. If they really /were/ parsed as comments
by HTML, their content would be commented-out, so it wouldn't really
be there at all (just as in XML, where there is no such thing as a
declared content model of CDATA - if one wants CDATA then it has to be
marked up explicitly).

However, I suspect that wasn't really what you meant. It's all rather
confusing, really.[1]

OK, there's no such thing as a "comment tag" in HTML:
http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.4

Inside of script or style elements, these *would* have been parsed as
HTML comments in HTML/2.0, which is why they were originally used.
But browsers from that era are practically unusable today (if only
because they don't support name-based virtual hosts), so it's high
time to stop worrying about them. And to start worrying about what
these character-strings will do in XML-based markups...
2. Your statement applies to _`script'_ elements.


As far as HTML/3.2 or later are concerned, their content models are
the same, so I don't see why you're drawing a distinction. A year or
two either way, it's still way back in WWW history.

best

[1] any other fans around here? ;-)
Oct 21 '05 #10
Alan J. Flavell wrote:

OK, there's no such thing as a "comment tag" in HTML:


I supposed I could have called them commands, too, then pointed to
Part 5 of
<URL:http://www.flightlab.com/~joe/sgml/faq-not.txt>

:-P

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Oct 21 '05 #11
Alan J. Flavell wrote:
On Fri, 21 Oct 2005, Thomas 'PointedEars' Lahn wrote:
kchayka wrote:
> Dump the <!-- --> comment tags. They haven't been needed for more than
> 10 years now.
1. They are NOT "comment tags".ss


Quite right: in HTML/3.2 and later, the content model of <style...>
(and of <script...> is CDATA, so there's no such thing as HTML
comments in them. [...]

However, I suspect that wasn't really what you meant.


Exactly.
It's all rather confusing, really.[1]
Not at all, if you read it very slowly :)
2. Your statement applies to _`script'_ elements.


As far as HTML/3.2 or later are concerned, their content models are
the same, so I don't see why you're drawing a distinction.


The distinction is that those comment strings are well-specified in CSS1+,
but not anywhere in ECMAScript. So they are both not harmful and they are
proper to use within the HTML `style' element but both potentially harmful
and unnecessary within the HTML `script' element (since there is no working
UA around that does not know the how to handle the HTML 3.2+ `script'
element, see below).
A year or two either way, it's still way back in WWW history.


There are no standards-compliant UAs around that don't know the `script'
element because HTML 2.0 (IETF standard) has been obsoleted by a text/html
RFC. However, there can still be UAs around that do not support HTML 4,
where the `style' element was introduced.
PointedEars
Oct 26 '05 #12
Lachlan Hunt wrote:
Thomas 'PointedEars' Lahn wrote:
kchayka wrote:
Harry Haller wrote:
<style type="text/css"><!--
Dump the <!-- --> comment tags. They haven't been needed for more than
10 years now.
Well, not quite that long, but they are certainly not needed these days.


I tend to agree, see below.
2. Your statement applies to _`script'_ elements. JavaScript within HTML
has been around since 1994 (NN2).

HTML 4 and CSS have been around since 1999,


CSS1 was first published as a rec in 1996. The script and style
elements have been around since they were introduced as place holders in
HTML 3.2, published in 1997.


Thanks. I stand corrected.
Since those comments do no harm in HTML... it is perfectly valid to
use them.


Well, that's essentially true, but they do harm scripts and styles in
XHTML, though most authors aren't aware of such issues anyway.


Yes, I know. However, XHTML and HTML are similar, but *different* markup
languages defined by *different* markup languages (SGML and XML), which is
why I mentioned HTML explicitely in the first place. That some things do
not work or do harm in XHTML bear no meaning for their use in HTML. The
"convert to" argument often used on this occasion is void; a decent
HTML-to-XHTML conversion program has to watch for those traps.
PointedEars
Oct 26 '05 #13
Thomas Lahn wrote:
Alan J. Flavell wrote:
A year or two either way, it's still way back in WWW history.
There are no standards-compliant UAs around that don't know the `script'
element because HTML 2.0 (IETF standard) has been obsoleted by a text/html
RFC.


RFC2854 ("The 'text/html' Media Type") obsoleted RFC1866 ("Hypertext Markup
Language - 2.0" which was PROPOSED STANDARD and is now HISTORIC) and other
RFCs.[1]
However, there can still be UAs around that do not support HTML 4,
where the `style' element was introduced.


Just to clarify: I take that sentence back. As Lachlan kindly pointed out
to me[2], the `style' element was already defined in HTML 3.2. So there is
no working/standards compliant UA around that is not supposed to know the
HTML `style' element.

Which is why there is indeed no excuse left for persisting on using comment
strings for its content. However, in contrast to being within the HTML
`script' element, since they are specified in CSS[3], they are not supposed
to do any harm there.
PointedEars
___________
[1]
<http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=rfc2854&opt=All+fields&nu m=25>
[2] <%a*******************@news-server.bigpond.net.au>
[3] <http://www.w3.org/TR/CSS2/grammar.html#q2> etc.
Oct 26 '05 #14
On Wed, 26 Oct 2005, Thomas 'PointedEars' Lahn wrote:
Just to clarify: I take that sentence back. As Lachlan kindly pointed out
to me[2], the `style' element was already defined in HTML 3.2.
Yes, I knew that, but I thought you were basing your argument on
history, which was why I contradicted you on the basis of history,
rather than of published specifications. Ho hum.
Which is why there is indeed no excuse left for persisting on using
comment strings for its content.


Well, they *would* be HTML comment strings, if it wasn't for the fact
that they're in CDATA declared content, so they aren't *really* HTML
comment strings. SCNR ;-)

cheers
Oct 26 '05 #15
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Which is why there is indeed no excuse left for persisting on using comment
strings for its content.


As already mentioned, the real deal is keeping style and script external
of course.

Anyway, it's generally a good thing to have a broader idea of the term
'UA' than 'web browser'. A lot of applications that mangle HTML suck,
and if e.g. some company converts 100s of HTML documents to PDF and the
results are full of script and style blocks because the responsible
development guy doesn't believe in voodoo, the suggestion to buy better
tools will likely be evaluated against a second opinion first (I do
foresee 'but those are basics of the profession' and '*everybody* knows
that you *must* do that').

Oct 26 '05 #16
Eric B. Bednarz wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Which is why there is indeed no excuse left for persisting on using
comment strings for its content.
As already mentioned, the real deal is keeping style and script external
of course.


Which is not applicable or even desirable always. For example, a "local"
style sheet with only one or two rules that apply to a single document may
refine a "global" style sheet referred to previously. You won't want me
to create a new file for that and refer to it instead, will you?
Anyway, it's generally a good thing to have a broader idea of the term
'UA' than 'web browser'. A lot of applications that mangle HTML suck,
and if e.g. some company converts 100s of HTML documents to PDF and the
results are full of script and style blocks because the responsible
development guy doesn't believe in voodoo, the suggestion to buy better
tools will likely be evaluated against a second opinion first (I do
foresee 'but those are basics of the profession' and '*everybody* knows
that you *must* do that').


I am not sure I understand what you mean by that:

( ) Web developers should use comment strings because of possible
conversion with buggy tools
( ) developers of conversion tools should adhere to the specifications
( ) other meaning:
__________________________________________________ ________________
__________________________________________________ ________________
PointedEars
Oct 28 '05 #17
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Eric B. Bednarz wrote:
As already mentioned, the real deal is keeping style and script external
of course.


Which is not applicable or even desirable always.


I can agree for a few situations, e.g. when processing and displaying
some kind of user input. Sometimes property values are just unknown
until something has been done.
For example, a "local"
style sheet with only one or two rules that apply to a single document may
refine a "global" style sheet referred to previously. You won't want me
to create a new file for that and refer to it instead, will you?
I find that really hard to answer, seriously; a lot of feeping
creaturism started as a standalone oneliner once (I *am* all in
favour of keeping the http request noise level down to the minimum,
really).

I could ask back, if my single document contains one unique image, you
won't want met to create a new file for that and refer to it instead of
including it base64-encoded in the document entity body, will you?
( ) Web developers should use comment strings because of possible
conversion with buggy tools
Well, I'm not saying they *should* do that, that's none of my business,
but I am saying indeed that *if* they do it they *might* have some
actual reason even today (though I would agree that mostly it's just
cargo cult).

Stuff like this is really a pain; as another example, support for at
least some basic proper typography -- e.g. quotation marks -- has been
around so long that it seems reasonable to say that there is no need to
use ugly ascii surrogates anymore. As Jukka has pointed out repeatedly
here, this breaks Google's translation service horribly; there's no need
to care about that of course, but all the same it might be a legitimate
reason to be ridiculously retro in some scenarios.
( ) developers of conversion tools should adhere to the specifications


I really wouldn't mind. ;)
--
hexadecimal EBB
decimal 3771
octal 7273
binary 111010111011
Oct 29 '05 #18
Eric B. Bednarz wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
For example, a "local" style sheet with only one or two rules that apply
to a single document may refine a "global" style sheet referred to
previously. You won't want me to create a new file for that and refer to
it instead, will you?
I find that really hard to answer, seriously; a lot of feeping
creaturism started as a standalone oneliner once (I *am* all in
favour of keeping the http request noise level down to the minimum,
really).


ACK
I could ask back, if my single document contains one unique image, you
won't want met to create a new file for that and refer to it instead of
including it base64-encoded in the document entity body, will you?


I honestly never thought of the possibility, but now that
you mention it, would that be achieved via a `data:' URI?

As every example, yours also hangs a bit. Graphics are in a
"binary" format; CSS and client-side scripting are plain text.
PointedEars
Oct 31 '05 #19
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Eric B. Bednarz wrote:
I could ask back, if my single document contains one unique image, you
won't want met to create a new file for that and refer to it instead of
including it base64-encoded in the document entity body, will you?


I honestly never thought of the possibility, but now that
you mention it, would that be achieved via a `data:' URI?


Yes. E.g., meet pacman:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAAD NDVhEAAAAD1BMVEX%2F%2F%2F8cHBz%2F%2F%2F%2BMjIxOTk4 DFJMfAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZc wAACxEAAAsRAX9kX5EAAAAHdElNRQfUBR0MMDTYAM%2BJAAAAN klEQVR4nGNggAMTQWcQ5SgoKCjCwMAsCAIODCyCEL4hhALRIhB lYArOh8nD1MP0w8yDmw8BAHX0Bi31%2FaYsAAAAAElFTkSuQmC C">
As every example, yours also hangs a bit. Graphics are in a
"binary" format; CSS and client-side scripting are plain text.


I think the words 'plain' and 'text' open doors to all kinds of
cumbersome discussions in this context. :)

A data URI contains nothing more than an ordinary text string, no matter
what the specified MIME type and encoding might be; if decoding it to an
image after transmission doesn't fit your idea of 'processing text',
neither should e.g. adding, removing or replacing DOM nodes.

--
hexadecimal EBB
decimal 3771
octal 7273
binary 111010111011
Nov 1 '05 #20
Eric B. Bednarz wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Eric B. Bednarz wrote:
I could ask back, if my single document contains one unique image, you
won't want met to create a new file for that and refer to it instead of
including it base64-encoded in the document entity body, will you?


I honestly never thought of the possibility, but now that
you mention it, would that be achieved via a `data:' URI?


Yes. E.g., meet pacman:

<img

src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPBAMAAAD NDVhEAAAAD1BMVEX%2F%2F%2F8cHBz%2F%2F%2F%2BMjIxOTk4 DFJMfAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZc wAACxEAAAsRAX9kX5EAAAAHdElNRQfUBR0MMDTYAM%2BJAAAAN klEQVR4nGNggAMTQWcQ5SgoKCjCwMAsCAIODCyCEL4hhALRIhB lYArOh8nD1MP0w8yDmw8BAHX0Bi31%2FaYsAAAAAElFTkSuQmC C">

Cute :) However, not as widely supported as `script' and `style' are.
Regards,
PointedEars
Nov 1 '05 #21
On Tue, 18 Oct 2005 09:15:51 -0500, kchayka <us****@c-net.us> wrote:
Harry Haller wrote:
How can I change the value in a css class?

For instance, with I.E., I want to change the value in the class
span.arr from middle to 0.2em. The value of middle is OK for most
other browsers.


Have you decided on a solution without really considering the actual
problem?
What should I be doing?


We can tell you, but you might not like it. ;)


Heh, why won't I like it? Thank you for taking the time to post. I
appreciate it. I will give very careful consideration to everything
you wrote.

Nov 7 '05 #22
On 18 Oct 2005 06:25:38 -0700, "Gomolyako Eduard"
<ed**************@gmail.com> wrote:
You can use conditional comments at IE.

Example HTML:
<head>
<style type="text/css"><!--
span.arr {vertical-align: middle;}
--></style>
<!--[if IE]>
<style type="text/css">
span.arr {vertical-align: 0.2em;}
</style>
< ![endif]-->
</head>

This is valid HTML.


It works with Firefox but with IE the last tag, < ![endif]-->, is
displayed at the top of the document. Although, at least the class is
re-defined for IE.

Below is no better, because the css class re-definition is just
ignored.

<head>
<style type="text/css">
span.arr {vertical-align: middle;}
<!--[if IE]>
span.arr {vertical-align: 0.2em;}
< ![endif]-->
</style>
</head>

Nov 7 '05 #23
On Mon, 07 Nov 2005 13:22:03 GMT, Harry Haller <Ha***@Steppenwolf.com>
wrote:
On 18 Oct 2005 06:25:38 -0700, "Gomolyako Eduard"
<ed**************@gmail.com> wrote:
You can use conditional comments at IE.

Example HTML:
<head>
<style type="text/css"><!--
span.arr {vertical-align: middle;}
--></style>
<!--[if IE]>
<style type="text/css">
span.arr {vertical-align: 0.2em;}
</style>
< ![endif]-->
</head>

This is valid HTML.


It works with Firefox but with IE the last tag, < ![endif]-->, is
displayed at the top of the document. Although, at least the class is
re-defined for IE.


Correction, it is good. I left a space in, < ![endif]-->, where
there should 've been none, <![endif]-->, because I just copied and
pasted from Eduard's code. Silly me.

Nov 7 '05 #24

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

Similar topics

2
by: fish | last post by:
Hi, I have an HTML page with a FORM and some input fields. On the fields I wish to do validation as the punters change the field values. If they get it wrong, then I tell them and then wish...
3
by: Tom | last post by:
I am writing a Visual basic .Net database application. There are many forms that first let you select and look at a DB record and then when you click a "modify" button you are allowed to change...
10
by: rob | last post by:
I have a class that among others exposes a string property "Date". The date in this property is stored in the form yyyymmdd. Now I do the following 1) Generate a DataGridViewTextBoxColumn column...
0
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form...
2
cassbiz
by: cassbiz | last post by:
I may be in the wrong forum so Ronald don't shoot :) In my code I have an option box to choose a number - works fine. I want to carry over the new value to another field to do a recalculation. ...
45
by: Zytan | last post by:
This returns the following error: "Cannot modify the return value of 'System.Collections.Generic.List<MyStruct>.this' because it is not a variable" and I have no idea why! Do lists return copies...
3
by: tc | last post by:
I'm trying to put together a small control. It's not, but for arguments sake, let's say it's a progress bar. The user will make a change to a setting, lets call it 'value'. I want to trap the...
4
by: CDMAPoster | last post by:
In: http://groups.google.com/group/comp.databases.ms-access/msg/f06bd4c45037ef29 Lyle wrote: :Terry Kreft wrote: : :>Suck it and See? :
2
by: C. Herzog | last post by:
Hi! I want to create a huge amount of classes. All classes have in common that the change of a property should fire an Change-Event and maybe do other things. I don't want to write thousand...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.