Tagged: x
-
AuthorPosts
-
July 5, 2016 at 12:44 pm #1073351
LeannaParticipantHi, I see lots of posts about hiding all bg images on mobile but I do not want to globally hide all my bg images on mobile, I only want to hide one bg image on one page. How can I do this? I have been trying to figure out my page ids as I did see some customizer code that used those, but I’m not sure what the “page id” is. What shows up in the URL in “Edit” on the page for which I need to hide bg image seems to be post.php?post=294&action=edit (www.tellasia.org/donate). Thanks for your help.
Btw, I’d really like to know why my “pages” are showing up as “posts” and how to get this “page id” to be a little simpler… like how about simply the name that I gave the page? I changed permalinks to “Post Name” but nothing seems to have changed.
July 5, 2016 at 12:44 pm #1073352
LeannaParticipantThis reply has been marked as private.July 5, 2016 at 1:02 pm #1073374
JadeModeratorHi Leanna,
You can see the guide on this page on how to determine the page ID.
Aside from the page ID, you will have to use the section ID if you intend to be more specific which section you will be targetting in CSS. You can add an ID to a section by adding it in the ID field in Cornerstone.
The code should look something like this:
@media (max-width: 480px) { .page-id-XX #x-section-XX { background-image: none !important } }Please replace XX in
.page-id-XXto the correct page ID then x-section-XX in #x-section-XX to the correct section ID.Hope this helps.
July 5, 2016 at 2:50 pm #1073544
LeannaParticipantOk I put this in but it’s not hiding the bg image:
/*HIDE BG IMAGE ON MOBILE ON ONLY CERTAIN SECTIONS*/
@media (max-width: 767px) {
.page-id-294 {
background-image: none !important
background-color: #990000;
}
}July 5, 2016 at 4:12 pm #1073669
Nabeel AModeratorHi again,
There is a syntax error in your code, please replace it with this one:
@media screen and (max-width: 767px) { .page-id-294 { background-image: none !important; background-color: #990000; } }Let us know how this goes!
July 5, 2016 at 4:51 pm #1073717
LeannaParticipantNope; bg image still appearing in mobile.
July 5, 2016 at 11:43 pm #1074167
Paul RModeratorHi Leanna,
You can try this code instead.
.page-id-294 #x-section-1 { background:transparent !important; }Hope that helps.
July 6, 2016 at 11:31 am #1075037
LeannaParticipantthat worked, thanks! I can also put any # color in there and it works too.
July 6, 2016 at 1:43 pm #1075203
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1073351 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
