Home › Forums › Cordero Pro › Changing the
- This topic has 6 replies, 2 voices, and was last updated 4 years, 1 month ago by eytcoaching.
-
AuthorPosts
-
October 20, 2020 at 8:52 am #12420eytcoachingParticipant
Hey I’m trying to change JUST the Explore Your Truth text and it changes on this view and reflects what I’m looking for but when I refresh on the main page, it affects all other areas. Please advise. This is the code that I’m using below. I have just muddled my way through this but wonder what I’m missing when I refresh on the other page. Also, will the scroll on the right side go away on the main page? How can that be done?
<html> <head> <link href='https://fonts.googleapis.com/css?family=Rock Salt' rel='stylesheet'> <style> body { font-family: 'Rock Salt';font-size: 49px; } </style> </head> <body> <span style="color:#F8B509" class="has-inline-color"> <center> <p>Explore Your Truth</p> </body> </html>
October 20, 2020 at 9:01 am #12423AndyKeymasterIf you are adding a paragraph of text, you don’t need to use the HTML block, you can just use the standard paragraph block.
In your code above, the content you have added is rendered immediately after the opening
<body>
tag. The theme does not do it like this, so I can’t quite understand how this is happening.Please let me know the URL of your website, and I’ll be able to take a look and advise you better.
October 20, 2020 at 11:18 am #12426AndyKeymasterOkay I’m re-reading your original post, and it seems that the code you posted is the actual code that you have added in the HTML block. Please correct me if I have got this wrong.
If so, this is incorrect HTML. You are adding extra
<html>
,<head>
, and<body>
tags, which is the wrong way to do this. There should only be one of each of these on a web page, and these tags are already part of the rendered web page’s HTML markup. So, additionally adding these within the page will indeed “affect all other areas” as you say, and result in incorrect HTML markup.October 20, 2020 at 11:27 am #12427AndyKeymasterThe correct way to add your paragraph in the HTML block would be like this:
<p style="font-family:'Rock Salt';font-size:49px;color:#F8B509;text-align:center;">Explore Your Truth</p>
But you don’t need to use the HTML block, as the standard paragraph block has options to change the font size, color, and also to align the text centered.
The theme does not at the moment have the option to change the font family on a block-by-block basis, but you could use a plugin such as the Google Fonts Typography plugin that puts font family selection into the page editor.
October 21, 2020 at 12:24 am #12430eytcoachingParticipantHey Andy, thanks for replying. The thing is, it doesn’t let me change just Explore Your Truth to rock salt. It also changes the body of my website. I just want the one line changed. If I change the font family, it adjust the entire page.
Is there a way to just change the one line in gold?
October 21, 2020 at 11:30 am #12437AndyKeymasterIn your code, you have the font-family applied to the body tag, so yes of course it will be applied to the entire page, because the whole page is wrapped in
<body></body>
tags.There are two different ways to correctly apply the “Rock Salt” font to only a specific element.
Option 1, add the styling inline in your HTML like so:
<p style="font-family:'Rock Salt';font-size:49px;color:#F8B509;text-align:center;">Explore Your Truth</p>
or Option 2, add CSS with a unique class name (“my-class-name” in this example):
<style> .my-class-name { font-family:'Rock Salt'; font-size:49px; color:#F8B509; text-align:center; } </style>
and then add the class name to your HTML like so:
<p class="my-class-name">Explore Your Truth</p>
October 22, 2020 at 3:48 am #12444eytcoachingParticipantThanks! Got it!
-
AuthorPosts
- The topic ‘Changing the’ is closed to new replies.