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

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;
}

Yes that works. Thank you so much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.