Site logo

Archived topic

Element Main Headlines

5 replies · Started by Bob on May 14, 2020

Viewing posts 1–6 of 6

Hi guys,
I have added some text and a phone number to the Home Page banner, using the Element 'Blog and Front Page Header'.
This is the code;

<h1><b>One call does it all
</b></h1>
<h3><b>
03 9311 8899</b>
</h3>

As the text is still a little hard to see, I have tried to add a background color to the text by popping this bit of code in;
<body style="background-color:#89c63e;">

But no matter where I place it it does not change the background of the text, it changes the entire page background Green.

<body style="background-color:#89c63e;">
<h1><b>One call does it all
</b></h1>
<h3><b>
03 9311 8899</b>
</h3>

Is there an easier way to add a color behind the text, without using html, a setting I am missing perhaps? If not, how do I do this?

Thanks

Hi there,

use this HTML for your Hero content:

<div class="hero-content">
    <h1><b>One call does it all</b></h1>
    <h3><b>03 9311 8899</b></h3>
</div>

Then add this CSS:

.hero-content {
    padding: 10px;
    background-color: #89c63e;
    margin-left: auto;
    margin-right: auto;
    max-width: 500px;
}

Thanks David,
That worked great, but how do I adjust the width of the background color?

I edited the CSS here to include a max-width property - edit that to suit

Awesome, thanks David.

You're welcome

This archived topic is closed to new replies.