CSS Code that Only Runs for IE 6

C

cfdvlpr

Is there a certain way that you can write your css code so that
certain properties for a class are only applied when the browser is IE
6?
 
E

Els

cfdvlpr said:
Is there a certain way that you can write your css code so that
certain properties for a class are only applied when the browser is IE
6?

Yes.
You'll need to do some puzzling though, and if you really only want to
address IE6 and not 5, 4, 3 or 7, it might be easier to use
conditional comments and a separate stylesheet.

For the puzzling: http://centricle.com/ref/css/filters/
 
J

Jukka K. Korpela

Scripsit cfdvlpr:
Is there a certain way that you can write your css code so that
certain properties for a class are only applied when the browser is IE
6?

Yes. But since you would use it for wrong reasons, it's better that you
don't know it. (The reasons are wrong because you didn't explain them.
Therefore you can't get a solution to the real problem - though you
might manage to get an advice on how to create the problem you're about
to create.)
 
E

Els

Jukka said:
The reasons are wrong because you didn't explain them.

I have reasons to dislike you. Since I will not explain them, I reckon
you will believe I dislike you for the wrong reasons. Which ironically
probably explains them to anyone else but you.

Dorayme, can you come back and prattle please? It's so much more
pleasant to read than whatever the above is called.
 
D

DocuMaker

Is there a certain way that you can write your css code so that
certain properties for a class are only applied when the browser is IE
6?

Javascript immediately comes to mind.

<script>
if browser = specific.type {
document.write("specific css file")
} else {
document.write("some other css file")
}
</script>

That is of course pseudo code. You can easily find a redirect script
online somewhere and then modify it to load a css file instead of
taking your visitors to a different page.
 
M

Michael Fesser

..oO(cfdvlpr)
Is there a certain way that you can write your css code so that
certain properties for a class are only applied when the browser is IE
6?

Google "Conditional Comments".

Micha
 
B

Beauregard T. Shagnasty

DocuMaker said:
Javascript immediately comes to mind.

<script>
if browser = specific.type {
document.write("specific css file")
} else {
document.write("some other css file")
}
</script>

What will your script do when it encounters my browser UA string:

Borgzilla/31.0 (Starship Enterprise NCC-1701)
 
D

dorayme

"Jukka K. Korpela said:
(The reasons are wrong because you didn't explain them.
Therefore you can't get a solution to the real problem - though you
might manage to get an advice on how to create the problem you're about
to create.)


I have become intensely interested in what you say in brackets*

Reasons cannot be wrong *because* they are not explicitly given.

While there are merits in the philosophy of positivism so
excitingly propagated by certain thinkers loosely centred on
Vienna earlier last century, most other thinkers had come to see
its flaws by at least the middle of that century. Perhaps in
Iceland, there is a current 21st century attempt at
rehabilitation? Do tell.
 
C

cfdvlpr

The conditional comment thing is not working for me. However, using
jQuery like this:
if( $.browser.msie && (jQuery.browser.version < 7.0000) ) {
$('#content').css("padding-right","2px");
}
does seem to work. Is that bad practice?
 
B

Bergamot

cfdvlpr said:
The conditional comment thing is not working for me. However, using
jQuery like this:
if( $.browser.msie && (jQuery.browser.version < 7.0000) ) {
$('#content').css("padding-right","2px");
}
does seem to work. Is that bad practice?

You're worried about a lousy 2px? You probably have a lot bigger
problems than you realize.
 
M

Michael Fesser

..oO(cfdvlpr)
The conditional comment thing is not working for me.

Then you've made a mistake. On my sites I use

<!--[if lte IE 6]>
<link rel="stylesheet" href="/css/ie6.css" type="text/css"
media="screen">
<![endif]-->

Adjust the path and filename as necessary.
However, using
jQuery like this:
if( $.browser.msie && (jQuery.browser.version < 7.0000) ) {
$('#content').css("padding-right","2px");
}
does seem to work.
Nope.

Is that bad practice?

Yes.

Micha
 
J

Jukka K. Korpela

Scripsit dorayme:
I have become intensely interested in what you say in brackets*

Parentheses, not brackets. (I might overuse parentheses but I seldom use
brackets [except as a special device when quoting].)
Reasons cannot be wrong *because* they are not explicitly given.

You might be right. Maybe I should have used a comma before "because".

The point, however, is that a failure to explain the reasons for
something like browser sniffing for CSS is a sure enough symptom of the
reasons being wrong. In this case, the subsequent posts from the OP have
confirmed that this conclusion was correct, as usual.
While there are merits in the philosophy of positivism so
excitingly propagated by certain thinkers loosely centred on
Vienna earlier last century, most other thinkers had come to see
its flaws by at least the middle of that century.

Is your virus control up-to-date? It seems like your system has a virus
that causes fragments of text to be inserted into your postings quite
randomly, or with rudimentary AI.
 
D

dorayme

"Jukka K. Korpela said:
Scripsit dorayme:


Parentheses, not brackets.

Brackets. Your parenthetical remark was in brackets, round
brackets to be more specific. There is no getting away from this.
No amount of babbling by either you or me can change this fact.
It is there for all to see. Not (Parentheses, not brackets) but
rather (Parentheses and brackets). In the last sentence what were
in the brackets were not parentheses - they could well not have
been in brackets. This goes to show that there are more things
that can go into brackets than parenthetical remarks. You have
not taken seriously my interest in all your bracketed content. I
am interested in all of it, not just the parenthetical remarks.
You should be flattered. You never realised how big a fan I was.
I forgive you.
You might be right. Maybe I should have used a comma before "because".

There really is no question of *might* here. It is not even
slightly controversial that someone might not reveal his good
reasons for doing something. A comma, alas, would not have
helped. Had you said:

"The reasons are wrong, because you didn't explain them".

it would have made no difference really. There is something too
deeply wrong. But I do not judge you harshly on this, I believe
you could reformulate. I have gone on here only because, to use
an Australian expression that is not as bad as it sounds, you
have been pissing me off lately. But I do settle if you are
polite.
The point, however, is that a failure to explain the reasons for
something like browser sniffing for CSS is a sure enough symptom of the
reasons being wrong. In this case, the subsequent posts from the OP have
confirmed that this conclusion was correct, as usual.


Is your virus control up-to-date? It seems like your system has a virus
that causes fragments of text to be inserted into your postings quite
randomly, or with rudimentary AI.

I cannot tell you how pleased I am that you should have brought
this to my attention. I have rejected the idea that you are
clueless about certain matters and preferred the virus theory.
Accordingly, I have unearthed other things that this virus has
spread in my writings. Like:

"In the movement loosely known as positivism, the meaning of a
statement was linked to the conditions of its verification. This
idea has a great deal of attraction and would almost certainly
appeal to hard headed technical folk. One particularly attractive
feature for an atheist is that all the statements made by theists
are worse than merely false. They appear to be bullshit. And they
are this because there is no way to verify them. Without knowing
how one would actually verify such statements, one is really
quite clueless about their real meaning.

Unfortunately, things are not quite as crude as this and the
atheist hoping for a quick method of refutation needs to pause
and reflect further. There are many statements that have turned
out to be true that, while not obviously incomprehensible, were
quite unaccompanied by any known means of testing."

I suppose this virus inserted this text from my writings at the
trigger of your statement about reasons being wrong when not
accompanied by explicit expression. Funny how these viruses work.
It is almost as if they see analogies where we don't.
 
S

Steven Saunderson

Brackets. Your parenthetical remark was in brackets, round
brackets to be more specific. There is no getting away from this.

Ouch. Sorry to butt in (like a goat) here but I think parentheses is
correct. I don't think "round brackets" is right.

() - parentheses
[] - brackets
{} - braces
<> - angle brackets
 
B

Ben C

On 2007-12-15 said:
"In the movement loosely known as positivism, the meaning of a
statement was linked to the conditions of its verification. This
idea has a great deal of attraction and would almost certainly
appeal to hard headed technical folk. One particularly attractive
feature for an atheist is that all the statements made by theists
are worse than merely false. They appear to be bullshit. And they
are this because there is no way to verify them. Without knowing
how one would actually verify such statements, one is really
quite clueless about their real meaning.

Unfortunately, things are not quite as crude as this and the
atheist hoping for a quick method of refutation needs to pause
and reflect further. There are many statements that have turned
out to be true that, while not obviously incomprehensible, were
quite unaccompanied by any known means of testing."

Can you give an example of such a statement?

I would have put it differently: there are many meaningful statements
that don't have any verification conditions.
I suppose this virus inserted this text from my writings at the
trigger of your statement about reasons being wrong when not
accompanied by explicit expression. Funny how these viruses work.
It is almost as if they see analogies where we don't.

I'm not seeing this one. The statement was "your reasons are wrong
because you didn't state them". It's a total presumption by Mr K., but
isn't he just presuming that the OP is clueless, not that the meaning of
any statement is its truth conditions?
 
B

Bone Ur

Well bust mah britches and call me cheeky, on Fri, 14 Dec 2007 20:26:43 GMT
Michael Fesser scribed:
Not really.


Browser sniffing _never_ works reliably.

Works for me. Always. However, I agree with your conclusion about j/s
being inappropriate for this case.
 
B

Bone Ur

Well bust mah britches and call me cheeky, on Fri, 14 Dec 2007 20:44:27 GMT
Beauregard T. Shagnasty scribed:
What will your script do when it encounters my browser UA string:

Borgzilla/31.0 (Starship Enterprise NCC-1701)

Well, if it's well-written, it will just "Kling-on"...
 
S

Stephan Bird

Brackets. Your parenthetical remark was in brackets, round brackets to
be more specific. There is no getting away from this.

Ouch. Sorry to butt in (like a goat) here but I think parentheses is
correct. I don't think "round brackets" is right.

() - parentheses
[] - brackets
{} - braces
<> - angle brackets

This may be a language thing. I refer to the 4 glyphs above as brackets,
square brackets, braces, and angle brackets respectively....

just my 2p

Stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top