css - 2 div alignment in mobile device -
i have problem in aligning div in mobile device.
my code like
text textwhen sink screen rfloatdiv div coming down, want lfloatdiv should go down instead rfloatdiv div.. got point?
please me.
there stacking order when use float
. basically, floated elements stack parent edge, move down next available edge. order appear in html important!
if have:
<article> <!-- order matter --> <div id="left">this left div</div> <div id="right">this right div</div> </article>
and in css:
#left { float: left; } #right { float: right; }
output small screen be:
this left div right div
but changing order appear in html modify happens when screen smaller.
play fiddle: http://jsfiddle.net/732ly/1/ change float left left or right right in fiddle , see results!.
good luck
Comments
Post a Comment