How do I change font size for one paragraph
-
I know this is a really basic question and maybe I just haven’t had enough coffee today. But I am stumped.
I want to make the first paragraph (a copyright credit) smaller on this page: http://www.worthparish.org/weddings/
I’ve added this to the text view
<p class=”small”>Photograph used with permission from, and copyright of, Graham Nixon.</p>then typed this in the customize CSS bit
.small {
font-size: 70%;
}Nothing changes. What else do I need to do, or is this totally wrong anyway?
What I need is a style called small, that I can apply to other areas, which is why I thought it should be in the CSS thingy.
Thank you in advance for any help you can give. I sense it’s something another person can fix in the blink of an eye.
Emmeline
xThe blog I need help with is: (visible only to logged in users)
-
Hi there. You can actually do this using inline CSS in the text editor view of the page editor. You don’t need to edit the theme’s CSS itself.
So, in the editor it would look like this:
<p style="font-size: 70%">Photograph used with permission from, and copyright of, Graham Nixon.</p>You can use the exact same code in the Caption field of the image as well, if you’d prefer the text to be directly associated with the image itself instead.
If you absolutely want to do this using a CSS class, I suggest you post in the CSS Customization forum, as the people most able to help you with that generally hang out there: https://en.forums.wordpress.com/forum/css-customization#postform
-
Thank you – that is great.
I also wasn’t aware of the caption thing.
I’d like to use it but it comes out as italic and a nasty font.
Is there somewhere global I can choose the font of “captions” ? -
To change the caption font globally you’ll need to edit the theme’s CSS, for which you’ll need the Custom Design upgrade. I’m teaching myself CSS, so I’m going to take a stab at this below, but if my solution doesn’t work you can post in the CSS forum for the code needed to make that change: https://en.forums.wordpress.com/forum/css-customization#postform
I think adding this to your theme’s CSS in the Customizer should do the trick:
.wp-caption-text { font-style: normal; font-family: insert name of desired font here; }However, you can also do this on an image-by-image basis using inline CSS. Using the same example as before:
<p style="font-size: 70%; font-family: georgia; font-style: normal;">Photograph used with permission from, and copyright of, Graham Nixon.</p>This should change the font and remove the italics. Behind ‘font-family’ you can, of course, insert any font you wish.
- The topic ‘How do I change font size for one paragraph’ is closed to new replies.