Forum Moderators: open
i have 2 <div> layers set up on my pages and the one is not compatible with netscape browsers... i just wanted to hide it from them, but keep it visible to internet explorer users.
thanks
div.hidden { display: none; }
* html div.hidden { display: block; }
ok, i can make it work with the conditional comments and the code dcrombie provided
I don't think you were meant to use both!
Conditional comments (of that type) are, AFAIK, XML compliant, and work in IE5 & above, while DCrombie's suggestion is a 'hack', relying on an IE 'bug'. That said, it is used quite a lot, and it's neater, easier and probably cooler.
The idea is that only IE considers that the HTML element could have a parent element (the *).
i took the easy way out, all i did was set the certain <div> tags to hidden.
then i used the conditional comment for ie to show the same <div> tags in ie browsers.
it looks pretty sloppy in the code, but it saved me from having to create 2 individual pages (ie and ns) for each future update.
thanks again for the help.
[edited by: encyclo at 12:33 am (utc) on Oct. 19, 2007]