Reputation: 2735
I'm a beginner of Wagtail, and trying to follow the tutorial to build a blog website.
The question I have is about RichTextField, inserting an image in the editor, and I have chosen the "Full Width" format, expecting the image should be centered (as said in the doc).
However it's not centered, as shown in the picture below.
What's wrong?
Upvotes: 1
Views: 451
Reputation: 25227
The docs don't say anything about the image being centred. On the contrary, the developer docs say:
The CSS classes added to images do not come with any accompanying stylesheets, or inline styles. e.g. the
left
class will do nothing, by default. The developer is expected to add these classes to their front end CSS files, to define exactly what they wantleft
,right
orfull-width
to mean.
So, to centre the image, you could define a CSS rule such as:
img.full-width {
display: block;
margin: auto;
}
Upvotes: 4