0

Hi

I have 2 divs and would like the one with id="logo" to be directly on top of the div with id="bg shape"

<div id="wrapper">

  <div id="logo"><img src="meshomagic_logo.jpg" width="559" height="280" alt="meshomagic logo"></div>
  <div id="bg shape"><img src="images/logo_bg.png" width="1000" height="114"></div>

</div>

My CSS Styles are as such:

#wrapper bg shape {
    position: absolute;
    left: 0px;
    top: 0px;

}
#wrapper logo {
    background-color: #000;
    position: relative;
    top: 0px;
    z-index: 2;
}

I've looked up quite a bit on positioning but I can't seem to get it to work?

Any help would be great.

Many thanks

2
Contributors
2
Replies
9
Views
5 Years
Discussion Span
Last Post by ebanbury
1

Well, your tag names are all wrong. Try this:

HTML

<div id="wrapper">
    <div class="logo"><img src="meshomagic_logo.jpg" width="559" height="280" alt="meshomagic logo"></div>
    <div class="bgShape"><img src="images/logo_bg.png" width="1000" height="114"></div>
</div>

CSS

#wrapper .bgShape {
position: absolute;
left: 0px;
top: 0px;

}
#wrapper .logo {
background-color: #000;
position: relative;
top: 0px;
z-index: 2;
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.