html - Can't make a div float right (may be because of flexbox?) -
basically, got container div in middle of page , 2 children divs. need right 1 @ right of container. float:right doesn't work. can't utilize margin-left since want work resolution. right:0 doesn't work well. using flexbox. may has it.
html code
<div class="parent"> <div class="child1">adsfasdfdsa</div> <div class="child2">192837192</div> </div>
css code
.parent { -o-display:flex; -webkit-display:flex; -ms-display:flex; -moz-display:flex; display:-webkit-box; display:-webkit-flex; display:flex; width:80%; margin:0 auto; } .child2 {float:right;}
here fiddle http://jsfiddle.net/82yxe/
use position:absolute;
, right:11%
here looks like.
html css flexbox
No comments:
Post a Comment