I am working on a site that uses position: relative div, containing position: absolute divs. I understand the concept that I believe, and everything works fine, but I can't get the attribute topto do anything. leftist work, but not the top. My code is as follows:
<div id="imagemenu">
<div class="west">
<img src="/makingmusicstore/wp-content/themes/makingmusic/img/west.png" alt="west">
</div>
<div class="southwest">
<img src="/makingmusicstore/wp-content/themes/makingmusic/img/southwest.png alt=" southwest ">
</div>
<div class="south ">
<img src="/makingmusicstore/wp-content/themes/makingmusic/img/south.png " alt="south ">
</div>
<div class="logo ">
<img src="/makingmusicstore/wp-content/themes/makingmusic/img/logo.png " alt="Making Music Store ">
</div>
</div>
CSS
#imagemenu {
position: relative;
}
.logo img {
position: absolute;
width: 20%;
top: 50%;
left: 40%;
}
.west img {
position: absolute;
width: 30%;
left: 15%;
}
.southwest img {
position: absolute;
width: 30%;
left: 15%;
}
.south img {
position: absolute;
left: 35%;
}
The site is adams-web.net/makingmusicstore and is currently a mess until I get the top quality attribute. It seems to me that the logo should be much further down the page, but it does not work, as I believe. I'm not sure what I am missing. It works when I change the position to static, but it does not maintain the correct position.
source
share