5 replies [Last post]
dlestarjette
Offline
newbie
Chicago, IL USA
Last seen: 16 years 44 weeks ago
Chicago, IL USA
Timezone: GMT-6
Joined: 2004-01-21
Posts: 6
Points: 0

Hello,

Can someone tell me how to hide text from all browers except IE for Windows? I've seen this done before, but I can't figure it out.

Does this make sense? I'm not sure how to explain it better than that. What I know of CSS, I learned by trial-and-error, so sometimes I have an idea of what I mean, but I'm not able to express it correctly. Laughing out loud

Help please!

Thank you,
Daniel

PezIbc
Offline
newbie
Last seen: 16 years 41 weeks ago
Timezone: GMT-4
Joined: 2004-02-16
Posts: 6
Points: 0

Displaying text for IE for Windows only

I'm curious as to why you would want to?

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 2 years 3 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Displaying text for IE for Windows only

Hi

In your html:

<div><p>This text is shown by all browsers<span class="ieonly">, but this is shown by IE only</span>. Is this what you want?</p></div>

And the css:

<style type="text/css">
.ieonly {display:none;}
* html .ieonly {display:inline;}
</style>

Should do it.

Trevor

dlestarjette
Offline
newbie
Chicago, IL USA
Last seen: 16 years 44 weeks ago
Chicago, IL USA
Timezone: GMT-6
Joined: 2004-01-21
Posts: 6
Points: 0

Displaying text for IE for Windows only

Thanks - I will give it a try. And I wanted to be able to do this because my site sometimes look funny in IE, so I want to include a like to something like Firefox that only IE users can see.

Does that make sense?

Thanks!

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 2 years 3 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Displaying text for IE for Windows only

Hi

If by 'like' you mean 'link', yes it does make sense, I ssumed that was something like why you wanted to do it, hence my example in a text line.

Let me know if it works.

Trevor

dlestarjette
Offline
newbie
Chicago, IL USA
Last seen: 16 years 44 weeks ago
Chicago, IL USA
Timezone: GMT-6
Joined: 2004-01-21
Posts: 6
Points: 0

Displaying text for IE for Windows only

Quote:
If by 'like' you mean 'link'

Yes - I will give it a try this weekend and let you know.

Thanks!
Daniel