- This topic has 18 replies, 4 voices, and was last updated 2 years, 3 months ago by Ying.
-
AuthorPosts
-
January 11, 2022 at 10:27 am #2076961Sophie
I am currently setting up GeneratePress on a staging site and have a few questions regarding typography. These were all check boxes within my last theme so I’m a bit lost on how to make it appear the same way. I also have very limited knowledge, so if I need to add code, please can you explain it as simply and detailed as possible π Thank you so much!
1. How can I justify all body text on my website?
2. How can I center all headings?
3. I would like to add a border and color background to all settings as I have it currently set up with my old theme (https://www.wedreamoftravel.com/national-parks-of-colorado/)
January 11, 2022 at 12:01 pm #2077073LeoStaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-informationLet me know π
January 11, 2022 at 3:10 pm #2077216SophieHi Leo,
Thanks for your response. I have included a link for the staging site. Hopefully this will work.
January 11, 2022 at 7:59 pm #2077356LeoStaffCustomer SupportTry this CSS:
.entry-content p { text-align: justify; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Looks like you’ve managed to center the headings?
January 11, 2022 at 8:20 pm #2077375SophieThanks Leo. I’ll try adding the code in. I’ve not managed to globally center the headers, I’ve manually changed a few. I’d appreciate advice on how to apply a global setting to center headers. Thank you for your help.
January 11, 2022 at 8:43 pm #2077385ElvinStaffCustomer SupportHi Sophie,
You can center all the headings with CSS:
h1, h2, h3, h4, h5, h6 { text-align: center !important; }
This will apply to ALL the headings on ALL of the pages throughout the site unless a specific heading has a text-align setting that wins in precedence. π
January 12, 2022 at 10:27 am #2078286SophiePerfect – my text is all aligned. However, how do I add a colored background and border to all headings as I have with my old theme (https://www.wedreamoftravel.com/national-parks-of-colorado/)? Thank you so much for your support.
January 12, 2022 at 11:24 am #2078342YingStaffCustomer SupportTry this for H2:
.entry-content h2 { background-color: #bfeaea; padding-top: 6px; padding-bottom: 6px; border: 1px solid #999999; }
January 12, 2022 at 11:29 am #2078345SophiePerfect- that worked π Thank you all for your help.
January 12, 2022 at 11:51 am #2078368SophieI’ve just come across an issue. For some blog posts, I want to be able to center text (rather than have it justified). How I previously had it set up on my old theme was that all body text defaulted to justified but any manual changes within the post to center the text would overwrite this. Is this possible? So all the text would by default be justified unless otherwise changed within the post?
January 12, 2022 at 12:26 pm #2078400YingStaffCustomer SupportSo all the text would by default be justified unless otherwise changed within the post?
Give it a try, it should be, but there might be some exceptions that I haven’t thought about.
If it doesn’t work, we can seek for another solution then π
January 12, 2022 at 12:36 pm #2078407SophieThank you for your reply but I’m a little confused, I’m not sure what I’m giving a try? I’ve already added the code suggested to justify the content, which works. However, if I manually center a block within Gutenberg, the default justification overwrites the manual change and the text remains justified rather than centered.
January 12, 2022 at 12:41 pm #2078412YingStaffCustomer SupportIn that case, can you link me to the post where I can see the issue?
January 12, 2022 at 12:45 pm #2078419SophieI am still using a staging site but will include the link for it.
January 12, 2022 at 1:07 pm #2078436YingStaffCustomer SupportThere’re couple options:
Do not use
paragraph
, instead usingheadings
for the text that you want it to be centered.Or
Change this CSS:
.entry-content p { text-align: justify; }
to:
p { text-align: justify; }
After the CSS change, justify will apply to all
p
elements on your site, not only the ones inside article. But it lowers down the priority of the CSS, so that the settings can override it.Let me know π
-
AuthorPosts
- You must be logged in to reply to this topic.