Title: Getting text boxes in CSS
Last modified: April 23, 2020

---

# Getting text boxes in CSS

 *  [aramithius](https://wordpress.org/support/users/aramithius/)
 * (@aramithius)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/getting-text-boxes-in-css/)
 * I’m trying to add custom CSS to my website, with a static background and coloured
   text box under the text (as in this example, [https://www.loreseekerspodcast.com/lore-lesson-55-the-chronology-of-eso/](https://www.loreseekerspodcast.com/lore-lesson-55-the-chronology-of-eso/)).
 * Can I apply that kind of text boxes with CSS?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgetting-text-boxes-in-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/getting-text-boxes-in-css/#post-12722493)
 * [@aramithius](https://wordpress.org/support/users/aramithius/)
 * Yes, you can style form input elements with CSS, probably the easiest way is 
   to use a CSS selector, details here:
 * [https://stackoverflow.com/questions/4113965/css-selector-for-text-input-fields#4113981](https://stackoverflow.com/questions/4113965/css-selector-for-text-input-fields#4113981)
 *  Thread Starter [aramithius](https://wordpress.org/support/users/aramithius/)
 * (@aramithius)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/getting-text-boxes-in-css/#post-12722742)
 * Oh, I don’t mean text boxes in the sense of forms to fill in, but a block of 
   solid colour underneath text. I want a graphic for the main website background,
   but a solid colour underneath text elements.
 *  Thread Starter [aramithius](https://wordpress.org/support/users/aramithius/)
 * (@aramithius)
 * [6 years ago](https://wordpress.org/support/topic/getting-text-boxes-in-css/#post-12922623)
 * I’ve found a solution for what I want here: [http://scratch99.com/wordpress/hacks/wordpress-simple-css-text-boxes-in-posts/](http://scratch99.com/wordpress/hacks/wordpress-simple-css-text-boxes-in-posts/)
 * The CSS for this works. However, with the Gutenburg editor I would have to apply
   this block by block, and they may have breaks. I want to have a single piece 
   of CSS that applies throughout the document that says “if there’s text, there
   needs to be solid black colour behind the text”.
 * How do I apply something this in the theme editor?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Getting text boxes in CSS’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [aramithius](https://wordpress.org/support/users/aramithius/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/getting-text-boxes-in-css/#post-12922623)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
