473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

div layering in firefox

Hi,

I'm trying to build a camera control menu bar for a web application.

I've gotten everything to work in IE6/7 but Firefox as a little bug.
Actually, it's probably IE that handles it incorrectly but does what I
want it to do, but you get the idea.

I have 3 divs.

<div id="leftzone"></div>
<div id="centerzone"></div>
<div id="rightzone"></div>

And here is the CSS:
#leftzone {
position: relative;
padding: 0 0 0 5px;
width: 600px; /*605*/
height: 33px;
text-align: left;
background-color: #FFFFFF;
}
#centerzone {
position: relative;
top: -33px;
width: 605px;
height: 33px;
text-align: center;
}
#rightzone {
position: relative;
top: -66px;
padding: 0 5px 0 0;
width: 600px; /*605*/
height: 33px;
text-align: right;
}
The idea being that any image put in the left zone will align to the
left.
Any images in the right zone align to the right, and the same deal for
the center zone.

Now, I want everything to be on the same line so I bring rightzone and
centerzone up and over leftzone. That way I have a nice clean menu bar
in which I can dynamically add little icons depending on the need of
the client.

My problem is that, since, technically, it's the #rightzone that ends
up with the higher z-index, it doesn't let me click "THROUGH" the div
to the other buttons in leftzone and centerzone. IE seems to figure out
there's no background, so he lets me click through.

Like I said, it's possible that IE simply handles this wrong and does
what I want it to do by sheer luck. But i'd still like a way to
reproduce that in Firefox..

Thanks in advance.

Dec 7 '06 #1
1 2926
There is no way to make Firefox "see" though the third/rightzone layer
that I know of.

But here is a different approach that I have used in the past which
display the same in IE and Firefox and without any hacks.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test</title>
<style>
#container {
padding: 0;
margin:0;
background-color: #FFe0FF;
width: 600px; /* over all width */
height: 33px; /* over all height */
}
#leftzone,#centerzone,#rightzone {
padding:0;
margin:0;
position: relative;
font-size:14px;
height: 33px;
width: 200px;
background-color: #FFe0FF;
display: inline; /* if you used block then IE would double up the size
of the margins */
}
#leftzone {
text-align: left;
float: left;
margin-left:5px; /* by using margins against a container we avoid the
IE padding bugs ! */
width: 195px; /* take the 5px left margin from the width width */
}
#centerzone {
text-align: center;
float: left;
}
#rightzone {
text-align: right;
float: right;
margin-right:5px;
width: 195px; /* take the 5px right margin from the width width */
}
</style>
</head>
<body>
<div id="container">
<div id="leftzone">
<a href="lkjlkj1">lkjlkj 1</a><br>
<a href="lkjlkj2">lkjlkj 2</a><br>
</div>
<div id="centerzone">
<a href="ssdfdd1">ssdfdd 1</a><br>
<a href="ssdfdd2">ssdfdd 2</a><br>
</div>
<div id="rightzone">
<a href="ertrte1">ertrte 1</a><br>
<a href="ertrte2">ertrte 2</a><br>
</div>
</div>
</body>
</html>
Hope this helps you

Nutrino

Dec 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
14
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT ===============================================================...
5
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>>...
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
12
by: amit | last post by:
Hello group, I'm kinda skeptical about a code is being used in my js program. All it does is checking what browser is being run and finds out if FLASH is installed or not. This code works...
6
by: scotty | last post by:
I have a script that loops through an existing table list and prepares each href element node to trigger a function when an image is clicked. The function that will be run passes a property value...
6
by: ravis64 | last post by:
Hi, I basicaly have a form of 9 images, spread in a 3 x 3 grid. What i need to do is give each image a border and on some of the borders they need to over lap the image a bit in the bottom corner...
7
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
8
by: dougawells | last post by:
I am having issues using layers due to the different ways that different browsers display them. I need to be able to layer some images together as they work independently of each other. For example...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.