Responsive triple <div>

Categories: CSS

Horizontally aligned <div>’s:

CSS:

container {
     width:100%; 
     text-align:center;
}
left {
     float:left; 
     width:100px;
}
center {
     display: inline-block; 
     margin:0 auto; 
     width:100px;
}
right {
     float:right; 
     width:100px;
}

HTML:

<div id="container"> 
     <div id="left"></div> 
     <div id="right"></div> 
     <div id="center"></div> 
</div>

Resources:

https://stackoverflow.com/questions/2603700/how-to-align-3-divs-left-center-right-inside-another-div

«
»