0

ページの下部に div があります。他のdivに拘束されません。メインの div と中心を少しずらして、どうすれば整列できますか。ページの高さが異なり、div に z-index:1; が必要な場合は、ページの上部に配置します。2 つの div の上部を揃える必要があります。一方を他方より高くすることはできません。

html

<body>
    <div id="Main"><div> //Css or html for this div can not be edited
    <div id="Our_hero_div"><div> //This has to be show ontop of main, but a bit off-center
</body>

CSS

#Our_hero_div{
    z-index:1; //this much remain
}
#main {
    margin:auto;
}
4

1 に答える 1