Firefox DIV Layer Issues
Working on a project recently, I ran across what appears to be a DIV layering issue while testing a web application in Firefox (specifically version 1.5.0.7). The project required using a DIV as a kind of menu bar and in this particular case I had to use absolute positioning to position it. What I observed was that when the “menu bar” DIV was visible, that it was not possible to click anything on the page “below” the DIV.
I searched the internet and found people with the same issues, but found no solutions other than “avoid absolute positioning”… I tried a few things, but ultimately stumbled upon on the solution. Check out the examples below:
This is an example of the issue.
Oddly enough, this sample did not have the DIV layering issue. Meaning, that it only happens when you have a table inside of the DIV. Very Interesting.
The solution to the issue was as simple as specifying a height for the DIV!
This is certainly something to remember the next time you’re working with layering DIV’s.
~ Bobby
Working on a project recently, I ran across what appears to be a DIV layering issue while testing a web application in Firefox (specifically version 1.5.0.7). The project required using a DIV as a kind of menu bar and in this particular case I had to use absolute positioning to position it. What I observed was that when the “menu bar” DIV was visible, that it was not possible to click anything on the page “below” the DIV.
I searched the internet and found people with the same issues, but found no solutions other than “avoid absolute positioning”… I tried a few things, but ultimately stumbled upon on the solution. Check out the examples below:
This is an example of the issue.
<html>
<head>
<style type="text/css" media="all">
.absdiv
{
position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px;
}
</style>
</head>
<body>
line 1
<br>line 2
<br>line 3
<div class="absdiv">
<table>
<tr><td>test</td></tr>
</table>
</div>
</body>
</html>
Oddly enough, this sample did not have the DIV layering issue. Meaning, that it only happens when you have a table inside of the DIV. Very Interesting.
<html>
<head>
<style type="text/css" media="all">
.absdiv
{
position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px;
}
</style>
</head>
<body>
line 1
<br>line 2
<br>line 3
<div class="absdiv">test</div>
</body>
</html>
The solution to the issue was as simple as specifying a height for the DIV!
<html>
<head>
<style type="text/css" media="all">
.absdiv
{
position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; height: 12 ;
}
</style>
</head>
<body>
line 1
<br>line 2
<br>line 3
<div class="absdiv">
<table>
<tr><td>test</td></tr>
</table>
</div>
</body>
</html>
This is certainly something to remember the next time you’re working with layering DIV’s.
~ Bobby
5 Comments:
At 5:43 AM, Anonymous said…
школьница видеоонлайн http://free-3x.com/ порно онлайн пожилые с молодыми free-3x.com/ малолеток онлайн [url=http://free-3x.com/]free-3x.com[/url]
At 3:09 AM, Anonymous said…
does viagra work womens viagra can viagra causes legs to ache cialis v s viagra buy viagra in england generic name of viagra viva viagra online viagra viagra price comparison viagra generic viagra logo effect of viagra on women viagra patent viagra and cannabis
At 12:12 PM, Anonymous said…
Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!
At 3:24 PM, Anonymous said…
You have to express more your opinion to attract more readers, because just a video or plain text without any personal approach is not that valuable. But it is just form my point of view
At 9:03 AM, Anonymous said…
I am reading this article second time today, you have to be more careful with content leakers. If I will fount it again I will send you a link
Post a Comment
<< Home