Problem med margin:auto
Hej eksperter.Jeg har det problem at min div ikke vil centreres. :)
Kode:
div#top {
width:100%;
height:75px;
background-image:url('baggrundbanner.jpg');
background-repeat:repeat-x;
}
div#header {
margin-left:auto;
margin-right:auto;
margin-top:0px;
margin-bottom:0px;
height:75px;
width:850px;
}
div#logo {
float:left;
height:75px;
width:400px;
}
div#login {
float:left;
height:75px;
width:450px;
}
div#undertop {
width:100%;
height:30px;
margin:0px;
padding:0px;
background-image:url('topbanner.jpg');
background-repeat:repeat-x;
border-bottom:1px solid black;
border-top:1px solid black;
div#undertopindhold {
margin-left:auto;
margin-right:auto;
margin-top:0px;
margin-bottom:0px;
height:30px;
width:850px;
<div id="top">
<div id="header"><div id="logo"></div>
<div id="login"> </div>
</div>
</div>
<div id="undertop"><div id="undertopindhold">h4j</div></div>
Sådan ser det ud - jeg har brugt samme metode i diven ovenover, men det virker åbenbart ikke her? :)
Nogen der kan hjælpe?