position de div
Posté : 24 déc. 2009, 09:22
Salut a tous et a toutes,
je suis face à une question problématique je deux div positionner de manière suivante le bord de haut à droite et le bord bas à gauche son superposer c'est le but rechercher, mais quand je réduis ma page les div bouge.
Question 1 : Pourquoi ?
Question 2 : Y a-t-il un rapport avec absolue relative ?
Question 3 : Y a-t-il une solution ?
un extrait de mon code css
ma page html
je suis face à une question problématique je deux div positionner de manière suivante le bord de haut à droite et le bord bas à gauche son superposer c'est le but rechercher, mais quand je réduis ma page les div bouge.
Question 1 : Pourquoi ?
Question 2 : Y a-t-il un rapport avec absolue relative ?
Question 3 : Y a-t-il une solution ?
un extrait de mon code css
Code : Tout sélectionner
#wrap {
margin: 20px;
width: 724px;
position: absolute;
margin-top: 250px;
margin-left: 20%;
margin-top: 16%;
background: url('images/***.jpg');
background-repeat: repeat-y;
color: #FFFFFF;
}
#top {
background: url('images/***.jpg');
height: 30px;
color: #FFFFFF;
}
#content {
padding: 0 40px 0 40px;
color: #000000;
}
#bottom {
background: url('images/***.jpg');
height: 30px;
}
#wrap2 {
margin: 20px auto;
width: 724px;
margin-left: 45%;
margin-top: 4%;
background: url('images/***.jpg');
background-repeat: repeat-y;
color: #FFFFFF;
}
#top2 {
background: url('images/***.jpg');
height: 30px;
color: #FFFFFF;
}
#content2 {
padding: 0 40px 0 40px;
color: #000000;
}
#bottom2 {
background: url('images/***.jpg');
height: 30px;
}
<div id="wrap">
<div id="top"></div>
<div id="content">
<!-- content page-->
div1
<br /><br />
</div>
<div id="bottom"></div>
</div>
<div id="wrap2">
<div id="top2"></div>
<div id="content2">
<!-- content page-->
div2
<br /><br />
</div>
<div id="bottom2"></div>
</div>
Merci pour toutes les réponses et Joyeux Noel a tous