Media Query Issue Please help

Bleow is my media query and for some reason it is not working at all
@media all and (max-width: 800px){

 .centered

 {

      color:white;

 }

}
Any idea?
Please help

I think your CSS is slightly messed up here. border-style is a property that takes a value but you are using it like a selector.

your right
I had cut some code out and left that border-style behined
that was a mistake but right now the background color is not changing at all

You’ve changed your original code so that it isn’t changing the background-color property, so of course the background color isn’t going to change :smiley:

The best way for us to help you is to provide a link to your actual project so we can see see everything. But if that is not possible then you need to paste your updated code here exactly as you have it in your project.

Thanks
here is the link
https://dayspringcampwv.com/

Thank for any help

Are you trying to change a font color? And what are you applying the ‘centered’ class to?

The media query has to be placed after the styles it is meant to overwrite. So after the .centered selector. You have it before the selector.

It doesn’t show where in the CSS stylesheet the media query is. Perhaps the centered class is already defined further up, and this is just the re-definition for this media query?

Anyhow, if you want to change the background color and not the font color, you’ll need to use ‘background-color’ instead of color, and have a space after the colon I believe.

They linked to the site.

You can view the source files, or look at the Styles tab in the dev tools (where you can see the order styles are applied).

Thank you That was very Helpful. !

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.