I want my divs to all be centered


#1


body{
    background-color:silver;
}
div{
    border-radius:7px;
    border:2px solid black;
    height:20px;
    text-align:center;
    margin:auto;
    clear:both;
    border-radius:30%;
    
    
}
#header{
    width:400px;
    
}
hmmm{
    color:blue;
    font-size:13
}
toast{
    color:black;
}
a:hover{
    text-decoration:none;
    color:red;
}
#footer{
    width:650px;
    background-color:#66EE11;

}
.left{
    width:550px;
    background-color:#33EEFF;
    

}
.right{
    width:450px;
    background-color:#CC4400;
}    
    
}



#2

you can center block level element with margin: 0 auto; this will possible max margin on the left and right side, centering it


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.