I’d like to add a CartoDB map to my website so that it has a fixed position and is hidden behind the main content. What I’ve done is quite similar to the html/css beneath:
<style type="text/css">
#1stcontent{
position:relative;
z-index:10;
margin-bottom:100%;
margin-bottom:100vh;}
#map{
height:100%;
height:100vh;
width:100%;
width:100vw;
position:fixed;
top:0;
left:0;
}
#2ndcontent{
position:relative;
z-index:10;
}
</style>
<div id="1stcontent">1st content</div>
<div id="map"><iframe src="//cartodb.com…"></iframe></div>
<div id="2ndcontent">more content</div>
This works pretty well for me in Chrome, BUT in Safari, either the #1stcontent or the #2ndcontent div is hidden under the map instead of being displayed on a top layer above the map. You may check this under http://asyl.ungeruehrt.de/ where the project is available at the moment.
Would be happy for some tips how to fix this behaviour!