html - How do i use floats for images while using <figure> so that <figcaption> still shows under image? -
when use <figure>
, <figcaption>
floating images, e.g
<figure> <img id="one" src="xxx" /> <figcaption>text</figcaption> </figure>
and in css:
#one { float: right; }
the captions kind of stay on page regular text instead of appearing under respective <img>
. how fix that? have display
?
use clear
on figcaption element:
figcaption { clear: both; }
Comments
Post a Comment