You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#107762 Any advice about using vs the JCE caption button?

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Friday, 07 May 2021 10:46 BST

BasilC
Any advice about using <figure> vs the JCE caption button? I've been using your caption functionality, but might I be better off using <figure>?

Ryan
JCE Captions were created before the
tag existed, or was part of the standard HTML specification, so it was a way to create inline, styled captions. The
and
tags are the "official" way to markup and caption images, with some caveats: [list=1] [*] The
tag is usually styled and displayed as a block element, which means it is on its own line, ie: you can't have something next to it like text, unless you are using Columns or some other sectioning markup. [*] By default the
tag is styled with margins all around it, so you usually have to override this with a margin:0 style [*] The
and
tags are usually unstyled - without borders, colours etc. - so you will need to add any special styling yourself. [/list] The following css seems to work well for generic
and
tags, which you can add to for additional styling:

figure {
    display: table;
    margin: 0;
}

figcaption {
    display: block;
    caption-side: bottom;
}

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.