The Big Spring Sale! Up to 50% off!

Custom HTML css class

destate
2 Posts
destate posted this 04 July 2022
Ask a Question

I'm using the HTML website builder and trying to add a custom HTML element with a custom css class, but it doesn't seem to be working for me. I'm very new to css, so it very well could be user error. In my website, if I drop in the following custom HTML code, I successfully get a button with red text:

<button style="color:#FF0000">Red button</button>

However, if I drop this code in, I don't get a red button:

<style>
.custombuttonstyle {
color: #FF0000;
}
</style>
<button class="custombuttonstyle">Red Button</button>

Better yet, I'd like to be able to just add the class to the page's CSS via the "Edit CSS" button instead of having to put in the Internal CSS "Style" section. But I'll settle for Internal CSS over Inline CSS.

I'm using the HTML website builder and trying to add a custom HTML element with a custom css class, but it doesn't seem to be working for me. I'm very new to css, so it very well could be user error. In my website, if I drop in the following custom HTML code, I successfully get a button with red text: &lt;button style="color:#FF0000"&gt;Red button&lt;/button&gt; However, if I drop this code in, I don't get a red button: &lt;style&gt; .custombuttonstyle { color: #FF0000; } &lt;/style&gt; &lt;button class="custombuttonstyle"&gt;Red Button&lt;/button&gt; Better yet, I'd like to be able to just add the class to the page's CSS via the "Edit CSS" button instead of having to put in the Internal CSS "Style" section. But I'll settle for Internal CSS over Inline CSS.

Last edited 04 July 2022 by destate

Vote to pay developers attention to this features or issue.
3 Replies
Order By: Standard | Newest
Support Team posted this 04 July 2022

Hi,

This code

<style>
.custombuttonstyle {
color: #FF0000;
}
</style>
<button class="custombuttonstyle">Red Button</button>

works ok. But Nicepage executes custom css in the browser preview only.
Also, please note that this code changes the button text color, not the background color.

Please let us know if you have any further questions.

...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, This code <style> .custombuttonstyle { color: #FF0000; } </style> <button class="custombuttonstyle">Red Button</button> works ok. But Nicepage executes custom css in the browser preview only. Also, please note that this code changes the button text color, not the background color. Please let us know if you have any further questions. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
destate
2 Posts
destate posted this 04 July 2022

Oof, I guess that's what "See changes in preview" in the CSS Class section is indicating... Everything works fine in that case! Thanks for your help!

Oof, I guess that's what "See changes in preview" in the CSS Class section is indicating... Everything works fine in that case! Thanks for your help!
Support Team
Support Team posted this 04 July 2022

Hi,

You're welcome!
Please let us know if you have any further questions.

...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, You're welcome! Please let us know if you have any further questions. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments