|
Posted by Sym on 08/10/06 12:16
OR
you could put the html you wish to hide on IE in a div then use css to
hide it
e.g. in the html
<div id="iehide">
.....html to hide in ie
</div>
then in your css
* html #iehide{display:none}
Andy Dingley wrote:
> 17th.of.april@gmail.com wrote:
>
> > Is there a possible CSS or hack than can hide items if the browser
> > being used is IE.
>
> Yes. Quite simply too.
>
> IE has a feature called "conditional comments". These are pairs of
> genuine HTML comments, which can have HTML between them. This is
> absolutely valid HTML and any real browser will see them as two
> comments with renderable content between them.
>
> However if you select the right conditional test, IE (or even specific
> IE versions) will instead treat both comments as being the start and
> end of one jumbo comment, hiding all the content between them.
>
> <!--[if !IE]>--><img src="..." alt="Won't appear in IE"
> ><!--<![endif]-->
>
> Note that this is only safe if you use the !IE form and test for _not_
> IE. Otherwise real browsers treat this feature as invalid and render
> the middle section anyway.
Navigation:
[Reply to this message]
|