Simple code for If Firefox Do this Else Do That
Simple code for If Firefox Do this Else Do That
am 30.06.2007 04:18:24 von MJones
Hi All,
I know this can be done, but I'm not a programmer. I only know HTML
so I'm hoping there's a simple way to do this.
If it matters, I'm using HTML 4.01 Transitional and utf-8.
I need the code because FireFox and IE6 or 7 behave differently with
image tags and relative positioning.
I've got an iframe over an iframe and I need to force positioning due
to some nasty menu code that has a mind of its own. The menu has a
division style with z-index:999999, too. If anyone could explain what
that it, it might help me. I've read about it, but still can't seem to
get my head around it.
Thanks all,
Michele
Re: Simple code for If Firefox Do this Else Do That
am 30.06.2007 05:37:46 von lws4art
mjones wrote:
> Hi All,
>
> I know this can be done, but I'm not a programmer. I only know HTML
> so I'm hoping there's a simple way to do this.
URL?
>
> If it matters, I'm using HTML 4.01 Transitional and utf-8.
New page...well that's your first mistake use HTML 4.01 strict for any
hope of consistency
>
> I need the code because FireFox and IE6 or 7 behave differently with
> image tags and relative positioning.
Think you have it backwards, most likely Firefox (et al.) are behaving
properly and IE is misbehaving. MS even provides a proprietary way to
handle IE deficiencies with conditional comments. You cannot do "if
Firefox to this else do that" but your can do "if IE do this else it
will be ignored be everyone else". But most likely it is not necessary
because it is probably do to some error in your markup. But how knows,
you did not supply a URL.
>
> I've got an iframe over an iframe and I need to force positioning due
> to some nasty menu code that has a mind of its own. The menu has a
> division style with z-index:999999, too. If anyone could explain what
> that it, it might help me. I've read about it, but still can't seem to
> get my head around it.
Yep, I am sure there is a problem with your markup...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: Simple code for If Firefox Do this Else Do That
am 30.06.2007 10:58:22 von Ben C
On 2007-06-30, mjones wrote:
> Hi All,
>
> I know this can be done, but I'm not a programmer. I only know HTML
> so I'm hoping there's a simple way to do this.
>
> If it matters, I'm using HTML 4.01 Transitional and utf-8.
>
> I need the code because FireFox and IE6 or 7 behave differently with
> image tags and relative positioning.
>
> I've got an iframe over an iframe and I need to force positioning due
> to some nasty menu code that has a mind of its own. The menu has a
> division style with z-index:999999, too. If anyone could explain what
> that it, it might help me. I've read about it, but still can't seem to
> get my head around it.
Basically it means it gets displayed on top of anything with a lower
value of z-index, or auto z-index, that's also below the nearest thing
above it in the document tree that has non-auto z-index.
But often people don't realize that z-index only applies to positioned
elements, so they set it all over the place without it doing anything.
And 999999 is a silly number. Probably 9 would have been fine.
Re: Simple code for If Firefox Do this Else Do That
am 29.07.2007 18:42:58 von MJones
On Jun 30, 4:58 am, Ben C wrote:
> On 2007-06-30, mjones wrote:
>
> > Hi All,
>
> > I know this can be done, but I'm not a programmer. I only know HTML
> > so I'm hoping there's a simple way to do this.
>
> > If it matters, I'm using HTML 4.01 Transitional and utf-8.
>
> > I need the code because FireFox and IE6 or 7 behave differently with
> > image tags and relative positioning.
>
> > I've got an iframe over an iframe and I need to force positioning due
> > to some nasty menu code that has a mind of its own. The menu has a
> > division style with z-index:999999, too. If anyone could explain what
> > that it, it might help me. I've read about it, but still can't seem to
> > get my head around it.
>
> Basically it means it gets displayed on top of anything with a lower
> value of z-index, or auto z-index, that's also below the nearest thing
> above it in the document tree that has non-auto z-index.
>
> But often people don't realize that z-index only applies to positioned
> elements, so they set it all over the place without it doing anything.
>
> And 999999 is a silly number. Probably 9 would have been fine.
For those looking for the answer, here's what worked:
In the head -
In the body -
Hope that helps,
Michele
Re: Simple code for If Firefox Do this Else Do That
am 29.07.2007 19:52:41 von John Hosking
mjones wrote:
> On Jun 30, 4:58 am, Ben C wrote:
>> On 2007-06-30, mjones wrote:
>>
>>> I need the code because FireFox and IE6 or 7 behave differently with
>>> image tags and relative positioning.
>>> I've got an iframe over an iframe and I need to force positioning due
>>> to some nasty menu code that has a mind of its own. The menu has a
>>> division style with z-index:999999, too. If anyone could explain what
>>> that it, it might help me. I've read about it, but still can't seem to
>>> get my head around it.
>> Basically it means it gets displayed on top of anything with a lower
>> value of z-index, or auto z-index, that's also below the nearest thing
>> above it in the document tree that has non-auto z-index.
>>
>> But often people don't realize that z-index only applies to positioned
>> elements, so they set it all over the place without it doing anything.
>
> For those looking for the answer, here's what worked:
Nice of you to post back. Although...
>
> In the head -
>
>
>
> In the body -
>
>
The above doesn't really matter, though, because you seem to have missed
the point. Ben and Jonathan tried to point you in a better direction,
but browser sniffing is almost certainly the wrong way to go here. And
that's even if you do the sniffing right (and also assuming nobody's
cloaking or changing their browser's string).
A URL would have helped us help you, but I'm not sure there's enough
interest on any side for that to happen.
--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
Re: Simple code for If Firefox Do this Else Do That
am 29.07.2007 19:58:10 von a.nony.mous
John Hosking wrote:
> And that's even if you do the sniffing right (and also assuming
> nobody's cloaking or changing their browser's string).
What would his code do with my UA string? :-)
Borgzilla/31.0 (Starship Enterprise NCC-1701)
--
-bts
-Motorcycles defy gravity; cars just suck