C
crossroad
Guest
I want to center my div so that it will appear at the center of any browser. How do i do that? text-align:center and margin:0 auto is not working.
It goes like this right?
for the html
<div id="container">
<div id="first"> </div>
<div id="second"></div>
</div>
css
#container {
width:800px;
float:left;
background-color:blue;
margin: 0 auto
}
again...margin:0 auto or text-align:center is not working, can someone please direct me to any tutorial or can give me some advice. I've been searching for one whole day and still no luck.
I just want that container to appear at the center. Thanks in advance
It goes like this right?
for the html
<div id="container">
<div id="first"> </div>
<div id="second"></div>
</div>
css
#container {
width:800px;
float:left;
background-color:blue;
margin: 0 auto
}
again...margin:0 auto or text-align:center is not working, can someone please direct me to any tutorial or can give me some advice. I've been searching for one whole day and still no luck.
I just want that container to appear at the center. Thanks in advance