Quantcast
Channel: CSS positioning divs - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by thirtydot for CSS positioning divs

$
0
0

See:http://jsfiddle.net/qXwKT/

CSS:

.box {    background: #ffffff;    padding: 5px;    border: 1px solid #b3b3b3;    -webkit-border-radius: 5px;    -moz-border-radius: 5px;    border-radius: 5px;}#container {    margin: 0 auto;    width: 400px;    background: #ccc;    overflow: hidden}#left, #right {    float: left;    width: 75px;}#mid {    float: left;    width: 250px;}#mid .box {    margin: 0 10px;    border-color: red}#left .box {    margin: 0 0 10px 0;    border-color: blue}

HTML:

<div id="container"><div id="left"><div class="box">left 1</div><div class="box">left 2</div></div><div id="mid"><div class="box">mid</div></div><div id="right"><div class="box">right</div></div></div>

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>