Use a background image in your CSS? Remember to specify a backup colour.
Whenever you specify a background image in your CSS, consider what happens if the image is missing. If there is text on top of the image, is it still readable? If not, specify a colour for the browser to use instead of the image so the text becomes readable again.
Why would an image be missing? A few possibilities are broken images, network problems, and user settings.
Here’s what the CSS could look like (long-hand used for clarity):
color:#fff; /* white */
background-color:#2f4b8e; /* blue */
This post is a Quick Tip. Background info is available in Quick Tips for web developers and web designers.
Subscribe / follow
- Android Mobile Developer at Quirky (New York City or San Francisco, Ca, US)
- UX/Creative Media Designer at Ultimate Fighting Championship (UFC) (Las Vegas, NV, Ne, US)
- Frontend Rails Designer/Developer at ZippyKid
- Mid to Senior User Experience Designer at Momentum Design Lab (San Francisco, CA, Ca, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost