Page 1 of 1

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 3:06 pm
by Chris Vogel
You can hide things from IE users by using pure CSS. This would come in handy for a little "Congrats! You aren't using IE" message. :roflmao2:

Using this CSS:

Code: Select all

p.classname:before {
content: "Congrats!  You aren't using IE!";
}
[code]

With this HTML:
[code]<p class="classname"> </p>[code]

IE doesn't support the CSS needed to make the content appear, so it just skips right over it.   :biglaugh:  If an IE user really wanted to know what the message says, he or she could just look at the stylesheet though.  

This is IE for Windows that I'm talking about.  I think IE for Mac supports it.  :)  You don't have to do just text either.  You can put an image or anything like that in there if you want.  

Note that you don't have to use paragraphs and you can use ":after" instead of ":before" if you want to.  I just thought I would share this.  :) 

[color=#888888][size=85]Archived topic from Iceteks,  old topic ID:1349, old post ID:11753[/size][/color]

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 3:11 pm
by Red Squirrel
haha that's cool. Actually, if you go on my home page with IE, in the bottom it has a link to use a better browser. Try it! :lol:

Archived topic from Iceteks, old topic ID:1349, old post ID:11754

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 3:15 pm
by Chris Vogel
Red Squirrel wrote: haha that's cool.  Actually, if you go on my home page with IE, in the bottom it has a link to use a better browser.  Try it! :lol:
HA! I didn't know that! :lol:

Archived topic from Iceteks, old topic ID:1349, old post ID:11755

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 3:17 pm
by Red Squirrel
takahita_tsukino wrote:
Red Squirrel wrote: haha that's cool.  Actually, if you go on my home page with IE, in the bottom it has a link to use a better browser.  Try it! :lol:
HA! I didn't know that! :lol:
Did that not too long ago. Figured it would be funny. Sadly, most people still use IE. Most of the log entries have IE as the user agent.

Archived topic from Iceteks, old topic ID:1349, old post ID:11756

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 3:22 pm
by Chris Vogel
Red Squirrel wrote:
takahita_tsukino wrote:
Red Squirrel wrote: haha that's cool.  Actually, if you go on my home page with IE, in the bottom it has a link to use a better browser.  Try it! :lol:
HA! I didn't know that! :lol:
Did that not too long ago. Figured it would be funny. Sadly, most people still use IE. Most of the log entries have IE as the user agent.
If I am not mistaken, Opera identifies itself as IE by default.... :unsure: I can also make Mozilla do the same thing, but I forgot how. There's a neat add-on for Firebird, but I don't know if there's one for Mozilla.

Archived topic from Iceteks, old topic ID:1349, old post ID:11758

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 4:06 pm
by Red Squirrel
Hmm did not know that about Opera. I knew about mozilla since there's a toolbar you can get for it. Had it once, lost it and never bothered putting it back, I did not use it that much.

Archived topic from Iceteks, old topic ID:1349, old post ID:11761

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 4:26 pm
by wldkos
yeah, opera and moz you can change your browser identification.

Archived topic from Iceteks, old topic ID:1349, old post ID:11769

Hide Things From IE with CSS

Posted: Sun Sep 21, 2003 4:52 pm
by Red Squirrel
wldkos wrote: yeah, opera and moz you can change your browser identification.
You can in IE too. But it's not suppost to be a feature - it's in the registry somewhere, I remember seeing it. :)

Archived topic from Iceteks, old topic ID:1349, old post ID:11771

Hide Things From IE with CSS

Posted: Mon Sep 22, 2003 11:23 pm
by megaspaz
konq will let you change your browser id and you're operating system. :P

Archived topic from Iceteks, old topic ID:1349, old post ID:11819

Hide Things From IE with CSS

Posted: Fri Sep 26, 2003 5:11 pm
by rovingcowboy
Red Squirrel wrote: You can in IE too. But it's not suppost to be a feature - it's in the registry somewhere, I remember seeing it. :)
but it is needed to be seen as what was downloaded by windows update so you can get the patches needed so going in to the registry and changing it is NOT a good idea :(

Archived topic from Iceteks, old topic ID:1349, old post ID:11957