I have a
<div class="banner-right">
and a
<div class="logo">
The Div Class Logo overlaps the banner-right, but the problem is that the right banner covers the logo. Is there a way to set the logo to say that it’s more important and it will show over the banner?
div.logo
{
display: block;
position: absolute;
top: 11px;
left: 483px;
margin-left: 472px;
width: 214px;
height: 169px;
background-image:url(images/doxramos_logo.png);
}
div.head-banner-right
{
display: block;
position: absolute;
top: 0px;
left: 159px;
margin-left: 472px;
width: 50%;
height: 60px;
background-image:url(images/metal_grid.jpg)
}
You can set the
z-indexcss property which will cause elements styled with a higherz-indexto appear above those with a lowerz-index. This only works for absolutely and relatively positioned elements. Since your elements haveposition: absoluteyou should be able to just add thez-indexproperty to your css styles for each element.Working Example: http://jsfiddle.net/HTM5v/
MDN Documentation: https://developer.mozilla.org/en-US/docs/CSS/z-index