I have designed an image that includes some accompanying text, as depicted in the figure below.
<span class="productname ">Beautiful Creations</span>
<img src="xy.jpg" data-attr="productimg" class="productimg " />
Below is my CSS code:
.productimg
{
float:right;
margin-top:15px;
height:120px;
margin-right:2%;
border:2px double #0ff;
width:150px;
}
.productname
{
font-size:1.2em;
display:block;
float:left;
}
I'm looking for help on avoiding text overlap and ensuring long text wraps to the next line when using CSS styles. Can someone please assist me with this?
After removing the 'position' rule and 'right=0'