Chapter 69. Applying Styles to Text Widgets

Text widgets accept CSS style rules, just as other HTML elements do. With CSS, you can change the default font of a menu, for example, or change the background color of a submit button. However, as with other HTML elements, different browsers don't always cooperate with the CSS styles you define for your text widgets, so be sure to preview your page in a variety of browsers.

FAQ

Can I use CSS styles with nontext widgets?

Yes, but don't get your hopes up. Nontext widgets such as checkboxes don't usually look the way you intend when you apply CSS styles to them.

Get Web Design Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.