- This topic has 13 replies, 3 voices, and was last updated 1 year, 7 months ago by Ying.
-
AuthorPosts
-
August 25, 2022 at 4:14 am #2323339Christopher
Hey guys,
on my site https://montenegrotower.com/ ive got this headline:
its my H1 tag and important for SEO, including my focus keyword “COWORKING SPACE IN MONTENEGRO”
However, I had to make the font smaller on the second line and for that I created a second H1 tag with different styling. I would however prefer to just have one H1 tag, can I perhaps achieve the same font settings using CSS code within the same H1 Tag?
Hopefully that makes sense π
Thanks
ChrisAugust 25, 2022 at 4:51 am #2323379DavidStaffCustomer SupportHi there,
might be a bit if head twister but here goes.
If you create a single H1 Headline.
Type your first line
Then hit Shift + Enter, to insert a line break (<br>
) in that same H1.
You now have two separate lines in your single H1.If you give that H1 Headline a CSS Class we can target eg.
multi-line-title
You can then use the
:first-line
pseudo selector to target whats on the first line eg..multi-line-title:first-line { /* Styles for line 1 */ }
and
.multi-line-title:not(:first-line) { /* Styles for lines 2 onward */ }
But heres the thing,
:first-line
isn’t what comes before the line break, its what you see on screen.So you must ensure thatWELCOME TO THE MONTENEGRO TOWER!
always remains as one line on all screen sizes ( as it does now )August 25, 2022 at 1:32 pm #2323966ChristopherThanks David! Awesome support as usual.
Before I proceed, a quick question: Ive uploaded the font used here (Oswald) to my server in order to avoid having to use the Google fonts, hopefully resulting in a tiny bit faster website.
When I use the CSS to style rather than the interface where I can toggle-off the Google fonts, do I have to put in some special command for that or just regular and the site will use the uploaded font on my server?
Btw, I wanted to thank you again for all your help, the website is pretty finished now and I am very pleased with how it looks and feels π
Thanks!
ChrisAugust 25, 2022 at 2:28 pm #2323990YingStaffCustomer Support, do I have to put in some special command for that or just regular and the site will use the uploaded font on my server?
That’s correct.
August 26, 2022 at 12:16 am #2324232ChristopherHi Ying, whats correct – that I have to put in a special command or that the site will use my uploaded font with the standard comment? π THanks
August 26, 2022 at 9:53 am #2324860YingStaffCustomer SupportSorry for the confusion, I mean you don’t have to put any special command… lol my bad!
September 1, 2022 at 9:24 am #2330697ChristopherHehe awesome, thanks!
Is there any quick way to “export” the exact settings that I have applied including Font, size, borders, padding, margins etc to CSS format? Just to make sure that I wont forget anything. That would be a great feature for future scenarios with more complicated settings.
Cheers,
ChrisSeptember 1, 2022 at 12:44 pm #2330834YingStaffCustomer SupportDo you mean the settings of GP customizer? or the settings of GB blocks?
September 2, 2022 at 9:29 am #2331710ChristopherI am not sure about the difference of customizer and blocks, I was just generally referring to all the settings that make the text look they way it looks now pretty much. Maybe that makes more sense π
September 2, 2022 at 11:19 am #2331795YingStaffCustomer SupportIf your typography settings are mainly in the customizer, you can export the settings at appearance > GeneratePresss > Import/export.
You will get a file which can be imported to your next site π
GB doesn’t have this option as it doesn’t have general settings, all the settings are individually added to blocks.
September 2, 2022 at 11:56 am #2331848ChristopherThanks, the question was how to get it into the CSS format to use for the above workaround by David. Is that possible as well?
September 2, 2022 at 12:22 pm #2331881YingStaffCustomer SupportNo that’s not possible, you’ll have to manually do that.
September 2, 2022 at 11:59 pm #2332107ChristopherAh ok too bad, sadly i dont know how to get all the settings in CSS, but its okay I will leave it as two H1 for now. I will look into this again when its a bit less busy π Thanks!
September 3, 2022 at 12:08 pm #2332590YingStaffCustomer SupportNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.