no idea how else to call my headline. I have a page for non-mobile devices. In this page I want to have a high image always fitting the window height. Page
Done it like this:
#background{
position:absolute;
background-color:#F00;
width:100%;
height:100%;
top:0%;
background-image:url(Ortsplan_2014_small.jpg);
background-size:contain;
background-repeat:no-repeat;
background-position:center;
}
Looks like in the "Page" link.
Now when I skale the window in order to try how it looks on other screens, this is what happens to my green div box:http://s14.directupload.net/images/140226/q8dbpdgj.jpg Or when ur on the page, just scale it yourself to see what happens.
This is the div box code:
#hotspot-nickelsee{
position:absolute;
background-color:#0F0;
top:25%;
width:10%;
height:10%;
left:33%;
}
This is the HTML-Code:
<div id="background">
<div id="hotspot-nickelsee">
</div>
</div>
Now what is wrong here? What do I have to do, in order to make the div box ALWAYS stay at the same position on the image - no matter how the window is sized? Any workaround?
When I'm trying to load the imagine into the "background" div instead of using it as a background picture, the div scales to 100% size of the image and fills the window (picture is very large) and that's not what I want.
Thanks for any kind of help!