Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Hello, I'm getting this "expected RBrace error".. I've tried a bunch of different variations and tested it in CSSlint.

Here it is.. } @media (max-width: 479px) { .header_widgets_wrap .slider_engine_revo .slide_socials, .header_widgets_wrap .slider_engine_revo .slide_title, .header_widgets_wrap .slider_engine_revo .theme_button, .header_widgets_wrap .slider_engine_revo .tp-caption {padding-top: 0px; !important .mobile_layout .top_panel .logo { margin-left: 30px !important;

}

It's giving me the error at ".tp-caption {padding-top: 0px; !important" Any clues as to what the problem could be?

I have no idea if it is the issue, but if you want to mark something as important, you will have to do it like this:

.tp-caption {
  padding-top: 0px !important;
}

Rather than

 padding-top: 0px; !important

1 Answer

What Rogier Nitschelm posted isn't the issue. You're meant to have !important before the semi-colon. Next time you post code on the forum can you please format it like this,

} @media (max-width: 479px) {
 .header_widgets_wrap .slider_engine_revo .slide_socials, 
.header_widgets_wrap .slider_engine_revo .slide_title, 
.header_widgets_wrap .slider_engine_revo .theme_button, 
.header_widgets_wrap .slider_engine_revo .tp-caption {
    padding-top: 0px;
!important .mobile_layout .top_panel .logo {
         margin-left: 30px !important;
    }

You're getting an error because of the fact that you have put the following code inside of .tp-caption

    !important .mobile_layout .top_panel .logo {
         margin-left: 30px !important;
    }

I'm also unsure why you have } before the @media (I'm assuming it's just because you have only given us a snip of your code and that does, in fact, close a legitimate class. Anyway, here is the code fixed up.

@media (max-width: 479px) {
     .header_widgets_wrap .slider_engine_revo .slide_socials, 
    .header_widgets_wrap .slider_engine_revo .slide_title, 
    .header_widgets_wrap .slider_engine_revo .theme_button, 
    .header_widgets_wrap .slider_engine_revo .tp-caption {
        padding-top: 0px !important;
    }
    .mobile_layout .top_panel .logo {
        margin-left: 30px !important;
    }
}

Thank you Cal! That worked like a charm!! After hitting my head on this, I just wasn't understanding where the error was. Have a good day!