css - How do I put two or more images side by side in HTML? -
say have 2 images , want place them side side few spaces between them, how do that? heard float? , how can/would use it?
usually images behave floating left, nicael pointed out, can place them next each other. or can use style="float:left;" stated in first answer. on other hand, image element has nice align attribute, allows manipulation in way:
<p>some text above</p> <img src="http://urlref.at/images/3o.gif" align="left" /> <img src="http://urlref.at/images/3o.gif" align="left" /> <img src="http://urlref.at/images/3o.gif" /> <p>some text underneath</p> then not put align left in last image text goes underneath , not next image.
to space image can use vspace , hspace attributes:
<p>some text above</p> <img src="http://urlref.at/images/3o.gif" align="left" hspace="20" /> <img src="http://urlref.at/images/3o.gif" align="left" hspace="20" /> <img src="http://urlref.at/images/3o.gif" hspace="20" /> <p>some text underneath</p> cleaner more complex using plain css styles.
Comments
Post a Comment