467,910 Members | 1,749 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

FireFox - graphics and Condition Statements HTML

Hi

Trying to write the Holy Grail 3-column layout as cross-browser
compatible.
Not much luck so far. Stuck on a problem with FireFox.
<!--[if IE 7]>
<div id="rightimage">
<img style="position: absolute; z-index: 0;
right: 0px; top: 0px;" src="images/right-column-graphic_b.jpg" alt=""
title=""/>
</div>
<![endif]-->
<!--[if !IE 7]>
<img style="position: absolute; z-index: 0; right:
0px; top: 0px;" src="images/right-column-graphic.jpg" alt=""
title=""/>
<![endif]-->
FireFox will not display the graphics.

<![if IE 7]>
<div id="rightimage">
<img style="position: absolute; z-index: 0;
right: 0px; top: 0px;" src="images/right-column-graphic_b.jpg" alt=""
title=""/>
</div>
<![endif]>
<![if !IE 7]>
<img style="position: absolute; z-index: 0; right:
0px; top: 0px;" src="images/right-column-graphic.jpg" alt=""
title=""/>
<![endif]>

FireFox displays BOTH graphics, one on top of the other.
Any advice ?
May 1 '07 #1
  • viewed: 5514
Share:
2 Replies
BobTheBowler wrote:
>
Trying to write the Holy Grail 3-column layout as cross-browser
compatible.

Not much luck so far. Stuck on a problem with FireFox.

<!--[if IE 7]>
Seems to me that there is something inherently wrong if you need a pile
of conditional comments to make something "cross-browser compatible".
Any advice ?
Post a URL, not code.

--
Berg
May 1 '07 #2
VK
On May 1, 7:49 pm, BobTheBowler <bobsh...@ntlworld.comwrote:
<![if IE 7]>
<div id="rightimage">
<img style="position: absolute; z-index: 0;
right: 0px; top: 0px;" src="images/right-column-graphic_b.jpg" alt=""
title=""/>
</div>
<![endif]>
<![if !IE 7]>
<img style="position: absolute; z-index: 0; right:
0px; top: 0px;" src="images/right-column-graphic.jpg" alt=""
title=""/>
<![endif]>

FireFox displays BOTH graphics, one on top of the other.

Any advice ?
Firefox doesn't understand conditional comments, only IE does. So
Firefox simply skips on <![if !IE 7]and <![endif]as unrecognized
tags but it render the rest. It means that you cannot use content-
revealing comments here, only content-hiding ones.
See my post "bye-bye, holly hack" for more info:
http://groups.google.com/group/comp....e25a044f4503e2

May 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tristan | last post: by
4 posts views Thread by fcurvat | last post: by
5 posts views Thread by MaxiWheat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.