-
AuthorPosts
-
July 18, 2017 at 10:44 pm #823524
Hi guys,
I’m trying to change the background color of the website, on certain grid rows, using the custom CSS name “Posters”. But its not working :/
I want the default to remain the same (#e8e8e8), but where I apply this CSS below, it changes.
@media only screen and (min-width: 1000px) {
.Posters {
max-width: 1600px;
margin: 0 auto;
background-color: #e8e8e8;
}
}Thanks!
ChrisJuly 19, 2017 at 5:49 am #823668Hey Chris,
Can you post a link to a page in your site where we can see the Posters class applied? so we can figure out why it’s not working.
Best regards,
NikkoJuly 19, 2017 at 7:51 pm #824129Hi Nikko,
Apologies!
Here’s the page:
And specifically here’s the section:
https://ibb.co/fcjvaQIts at the bottom of the page with the two posters.
Thanks!
July 20, 2017 at 4:21 am #824325Hi Chris,
Thanks, I have checked it and it works however there is also background color applied to the 1/2 columns which is on top of the Posters class section though I could see both uses same color #e8e8e8, I think you can use this to apply the background color:
#top .Posters .av_one_half { background-color: #e8e8e8 !important; }
Hope this helps :)
Best regards,
NikkoJuly 20, 2017 at 5:22 am #824365July 20, 2017 at 10:17 am #824461Hi Chris,
Sorry I made a mistake, the problem is appearing on larger screens, I think you just need to change from your .Posters code the
max-width: 1600px;
to:
max-width: 100%;
Hope this helps :)
Best regards,
NikkoJuly 20, 2017 at 4:04 pm #824657Hey Nikko,
But does this still keep the two posters from expanding past 1600px? I used that CSS originally becuase I didn’t like how big those two images got on larger screens.
Thanks!
ChrisJuly 20, 2017 at 10:07 pm #824870Hi Chris,
Can you try adding this css code:
#top .Posters .av_one_half .av_one_full .avia-image-container { max-width: 800px; } #top .Posters .av_one_half.avia-builder-el-first .av_one_full .avia-image-container { margin-right: 0; } #top .Posters .av_one_half.avia-builder-el-last .av_one_full .avia-image-container { margin-left: 0; }
Hope this helps :)
Best regards,
NikkoJuly 20, 2017 at 10:18 pm #824875Hey that worked!
But how did it work? Haha
Would this same CSS work if I did 3 images side by side?
July 21, 2017 at 4:05 am #824934Hi,
No it wouldn’t work on 3 1/3 column, you would need to add another code for that. basically I just set maximum width of the image to 1/2 of the 1600px (800px) then set the left image to align right and right image to align left so it’s still centered :)
Best regards,
NikkoJuly 21, 2017 at 10:10 pm #825248Ah I see,
Thank you Nikko!!!!!
July 22, 2017 at 8:05 am #826826 -
AuthorPosts
- The topic ‘Change body background color through CSS’ is closed to new replies.