Monday, November 30, 2009

Is there a code for text to wrap around the image while its in the middle of the text?

whats the code for text to wrap around the picture but the picture is in the middle of the text



instead of align to the right or left . can someone tell me the code , i want it for my myspace



Is there a code for text to wrap around the image while its in the middle of the text?

%26lt;div id="content"%26gt;



%26lt;p%26gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc quis urna at leo pretium consectetuer. Morbi elementum. Suspendisse adipiscing velit id quam. Donec vel felis non tortor faucibus rutrum. Mauris fringilla, justo vitae aliquam dapibus, mauris lorem bibendum ligula, sit amet dictum libero metus vel diam. %26lt;img src="foo.jpg" /%26gt; Ut tellus risus, euismod ac, dignissim ac, vehicula sit amet, leo. Donec commodo dignissim metus. Ut aliquet lorem vel dui. Nunc dictum, quam vel accumsan aliquet, lacus lorem scelerisque lorem, ac ornare mi orci nec est. Nullam venenatis, dolor in adipiscing vehicula, mauris urna luctus purus, sed aliquam lectus leo ullamcorper magna. Ut massa sem, faucibus ut, adipiscing id, dapibus et, turpis.%26lt;/p%26gt;



%26lt;/div%26gt;



CSS:



#content p img {



margin: 10px;



float: left (or right);



}



Is there a code for text to wrap around the image while its in the middle of the text?

One thing you can do is to float the image using css to either the left or right. Then you can add padding to the sides of the images which makes the text flow with the image on the side.



Floating only makes the image go to the left or right though so I see you have a problem there. You may be able to accomplish thing using position absolute although I am not sure on that.



More information of floats and CSS can be found at http://www.freecss.info



I hope that answers your question.

No comments:

Post a Comment

 
web development