Archived topic
Using @media queries with sections and multiple page
1 reply · Started by mmarvel on February 2, 2018
Hi
So I have asked about media queries before and got direction to use
@media (max-width: 768px) {
#generate-section-1.generate-sections-container {
background-image: url(http://myurl-mobile.jpg);
}
}
But when i have more then one page using sections then this puts the same image on both pages (for example home and blog).
How do i distinguish between the section1 of different pages in my css?
thanks. Martha
Hi Martha,
Are you using Tom's Simple CSS?
If so it gives a CSS metabox for each page.
If not then you will need to add page id before the selector like:
@media (max-width: 768px) {
.page-id-xxx #generate-section-1.generate-sections-container {
background-image: url(http://myurl-mobile.jpg);
}
}