I found a difference in terms of how Chrome displays an absolute positioned element over a relative positioned div
Here is some markup:
<div id="maincontent">
<table id="mainTable">
<tr class="menuRow">
<td >
<div id="menu">
<ul id="panel">
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
</ul>
</div>
</td>
</tr>
<tr>
<td class="contentRow">
<div id="content" >
</div>
</td>
</tr>
</table>
CSS:
#maincontent { width: 100%; }
#mainTable { width: 100%; }
#menu { position: fixed; background-color: green;
width: 30px; height: 30px; cursor: pointer; }
#panel{ position: absolute; height: 150px; width: 100px;
background-color: red; display:none; z-index:10; }
#content { margin-top: 30px; height: 300px; width:300px;
background-color: #00F; position:relative;}
I put together a sample here that shows my problem. (If you move the mouse over the green box the red “menu” is shown)
In IE and Firefox I see it correctly over the blue content. In Chrome the “menu” is shown behind content. Is there any way to make this work for Chrome?
Thank you very much, any feedback is welcome.
Yup, up the z-index on
#menu:http://jsfiddle.net/Ezn4v/