Here example code
<div id="field_one">
<p> ndustry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchange</p>
<div id="field_two">
<ul>
<li>one</li>
<li>one</li>
<li>one</li>
</ul>
</div>
</div>
Css
div#field_one {
width:400px;
height: 200px;
float: left;
}
div#field_two{
float:right;
width:200px;
height: 100px;
background: green
}
I need you to wrap text around a block element and was with him at the same level;
Here is link on jsfiddle what i am trying to achive, but text should wrap that div element
You cannot simply put a
marginon a floated element to reposition it; this will not make it work as you intend it.Instead, change the order of the elements:
http://jsfiddle.net/h58Ra/26/
Edit:
If you cannot change the order of the elements in the HTML code, consider changing the order of the elements with jQuery:
http://jsfiddle.net/h58Ra/30/
The jQuery I did here saves the floated element in a variable, removes it from its old position and then prepends it in the parent div.