Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm very, very new to CSS.
Having trouble with a padding issue on my front page here:
http://77.104.145.188/~troutb5/
In the mobile view, under all Quotes posts, there is no pad/margin. The theme author gave me the following code to add to Custom CSS:
The code the author gave me won't post here because it's not formatted correctly.
There is obviously something wrong with that code because it won't post correctly here. Here is a screenshot of the code inserted into my custom CSS section. It's the bottom code listed as "Quotes Border in Mobile."
http://77.104.145.188/~troutb5/wp-content/uploads/2016/09/ErrorForQuotesMobilePaddingCode.jpg
It does not work to solve the problem. When I insert that code, I get an error on the side, reading "Expected LBRACE at Line 43 Column 1.
The theme author usually takes many days to respond, especially over weekends, so I thought I would ask my question here. Is there a simply solution to fix this code?
I did search here and found a previous solution for a possible invisible character.
CSS lint parsing error - expected LBRACE error
That solution did not work.
Any help would be very much appreciated. Thank you
–
As you discovered, that @media line was the problem. However, you probably want to add it back in with the correct syntax. That code was just missing wrapping braces, so it should look like this:
@media(max-width:480px){
.padding_link_quote{
margin-bottom:40px;
That is the correct syntax for what's called a media query -- CSS statements that only apply to certain screen widths. Note the wrapping braces around any statements you want to put inside that "breakpoint"
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.