Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSS error

Featured Replies

Hi all,

 

I have problem with my css.

 

CSS Code:

.footer{font:bold 11px/12px Verdana, Arial, Helvetica, sans-serif;color:#fff}

 

Above is my css style. When I m valid it in W3C CSS Validator, with PROFILE: CSS level 3. It show's warning "You have no background-color set (or background-color is set to transparent) but you have set a color. Make sure that cascading of colors keeps the text reasonably legible." (NOTE:There is no background in this css)

 

Can anyone solve this problem and give me guidence what I have to do int this case.

 

Thanking your help in advance.

 

Shiirish.

"You have no background-color set (or background-color is set to transparent) but you have set a color. Make sure that cascading of colors keeps the text reasonably legible."

 

What this is saying is that you haven't set a background colour but you have set a text colour. So if your footer just happened to be displayed on top of something else that was white, or your page background was white, then you wouldn't see the text.

 

This is a WARNING though and not an ERROR. It's simply suggesting that if you wanted to redesign your site at any point and you decided to have #fff as your background colour then you wouldn't be able to see the text.

 

If you want to get rid of the warning you'll need to set a background color for the footer, just match it to the rest of your site.

 

So...for example.

 

.footer{
font:bold 11px/12px Verdana, Arial, Helvetica, sans-serif;
background-color:#000; 
color:#fff;}

 

Hope that helps.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.