css - Floating 3 divs within a container div -
i attempting float 3 divs within container div. thought simple i'm having difficulty keeping them evenly spread apart. want website responsive, can't have spacing specified in px.
css:
#circlecontain{background-color:green;height:200px; width:1200px; margin:auto;} .circle{width:200px;height:200px;border-radius:100px; font-family:arial, helvetica, sans-serif;font-size:20px;color:#fff; line-height:150px;text-align:center;background: rgba(0,0,0,0.8); margin:auto; display:inline-block; vertical-align:middle; }
thanks in advance
hold them inside 3 div elements width of 33%
each, , use margin: auto;
on round divs, way equal.
<div class="wrap_me"> <div></div> </div> <div class="wrap_me"> <div></div> </div> <div class="wrap_me"> <div></div> </div>
css
.wrap_me { width: 33%; border: 1px solid #f00; float: left; } .wrap_me div { width: 150px; height: 150px; border-radius: 100px; border: 1px solid #ddd; margin: auto; }
you can hold inside single container min-width
property elements don't wrap incase of insufficient width
Comments
Post a Comment