0

My WordPress site doesn't seem to let me z-index my comment section over my main content. My goal is to have my .column-left be fixed in position, but it overlaps everything below it. This is what I currently have that you will see live at jpshots.com

<div class="guts">
<div class="column-left"> copy </div>
<div class="colum-right"> gallery </div>
<div class="clear"></div>

.column-left{
float:left;
display: block;
width: 35%;
position: relative; 
height:100%;
z-index:1
}


#comments{
z-index:99999;
}

footer{
z-index:999999;
}

When I try to switch the position type of .column-left, it covers it up. Any insight would be greatly appreciated!

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119

1 Answers1

0

z-index does not work on position:static elements (which, mysteriously, is the default).

z-index only affects elements that are position:relative, position:absolute and position:fixed.

Try adding position:relative to your elements.

Note that position:relative operates pretty much identically to position:static, but it also works with absolute positioning and z-index.

cssyphus
  • 37,875
  • 18
  • 96
  • 111