p1xel p1xel - 1 year ago 77
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

Answer Source

Use clear on figcaption element:

figcaption {
  clear: both;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download