Comment Box Colors
This page contains examples of adding color to comment boxes. Feel free to copy and paste this code into your own website.
Background Color
You add color to your comment box using CSS. Here, we change the background color of the comment box. We do this by applying the CSS background-color
property to the HTML <textarea>
element.
Choose your colors with the HTML color picker.
Text Color & Size
Here, we change the color of the text inside the comment box. We do this by applying the CSS color
property to the HTML <textarea>
element. We also change the font, size, and lineheight of the text using the font
property.
Button Color
Here, we change the color of the submit button and its text. We do this by applying both the background-color
and color
properties to the button. We also apply the border
to style the button's border. The button is specified using the HTML <input>
tag (although we could just have easily used the <button>
tag).
Scrollbar Color
Here, we specify scrollbar properties which include changing the color of the scrollbar. We do this with a bunch of -webkit-
properties (such as ::-webkit-scrollbar
, ::-webkit-scrollbar-thumb
, and ::-webkit-scrollbar-track
).
The above example will only work on Chrome and other webkit based browsers. This is because it uses webkit extensions (i.e. the bit that goes -webkit-
).
For more scrollbar examples, see HTML scrollbars.
For an explanation on customized scrollbars, see CSS scrollbars.