Tuesday, December 18, 2012

css – Two column dynamic layout

I have several boxes containing the following!



<div class=\"box\">
<div class=\"image\">
<img src=\"anything.png\" /> <!-- The width is dynamic -->
</div>
<div class=\"box-text\">
<h2>Some Title</h2>
<p>Lorem ipsum ...</p>
</div>
</div>


The problem is that the text floats to the left after the image. I want it to go straight down, as I\’ve marked it in the following image:




Example




This is the way it should look like:


enter image description here


I do not want to use #code#PnRhYmxlczw=#/code# or javascript. I can\’t use margin-left for the box-text, because the width of the image is dynamic.


Thanks for your contribution!






Rating: 3 out of 5 based on 4 ratings



The post css – Two column dynamic layout appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/css-two-column-dynamic-layout.html

No comments:

Post a Comment