p1xel p1xel - 9 months ago 23
HTML Question

How do i use floats for images while using <figure> so that <figcaption> still shows under image?

When i use

with floating images, e.g

<img id="one" src="xxx" />

and in CSS:

#one {
float: right;

the captions kind of stay on the page like regular text instead of appearing under respective
. How do I fix that? Does that have something to do with


Use clear on figcaption element:

figcaption {
  clear: both;