Home Forums Cordero Pro Changing the

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12420
    eytcoaching
    Participant

    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>
    • This topic was modified 1 month, 1 week ago by Andy.
    • This topic was modified 1 month, 1 week ago by Andy. Reason: Edited to put code in code tags
    #12423
    Andy
    Keymaster

    If 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.

    #12426
    Andy
    Keymaster

    Okay 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.

    #12427
    Andy
    Keymaster

    The 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.

    #12430
    eytcoaching
    Participant

    Hey 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?

    #12437
    Andy
    Keymaster

    In 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>

    #12444
    eytcoaching
    Participant

    Thanks! Got it!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Changing the’ is closed to new replies.