[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Hide display of Sitelock badge on mobile devices

Posted on 2016-10-17
9
Medium Priority
?
60 Views
Last Modified: 2016-10-18
Currently I have Sitelock badge code in the footer which I put online using Genesis Simple Edits.

We want to setup a media query so that the Sitelock badge does NOT display on mobile devices (but does on desktops) because it gets in way of viewing site content. But, I am not sure how to cite this badge in the css.  

http://sheboyganseniorcommunity.com
http://screencast.com/t/CJTXe0zMc4
0
Comment
Question by:nsitedesigns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 20

Assisted Solution

by:Russ Suter
Russ Suter earned 2000 total points
ID: 41847213
Name the containing div then just cite that div by name in your CSS.
0
 

Author Comment

by:nsitedesigns
ID: 41847235
I added it to the media query as below:
  
 .footer-widgets-1, .footer-widgets-2, .footer-widgets-3, .footer-widgets-4 {
		width: 100%;
    text-align: left;
    padding: 40px 0;
	}


div.sitelock {
    visibility: hidden;
} 

}

Open in new window


.... and I added a class to the code in the footer but it still displays.  What did I do wrong?
 
<div class="sitelock" style="position: fixed; z-index: 1000; width: 164px; height: 98px; bottom: 15px; right: 15px;"><a href="#" onclick="window.open('https://www.sitelock.com/verify.php?site=sheboyganseniorcommunity.com','SiteLock','width=600,height=600,left=160,top=170');" ><img class="img-responsive" alt="SiteLock" title="SiteLock" src="//shield.sitelock.com/shield/sheboyganseniorcommunity.com" /></a></div>

Open in new window

0
 
LVL 20

Assisted Solution

by:Russ Suter
Russ Suter earned 2000 total points
ID: 41847264
it looks right to me. However my inspector doesn't show the CSS is loaded anywhere.

I'd also make 2 changes.

1. Reference the div by Id rather than class since this is a one-off thing.
2. Set display: none rather than visibility: hidden

Injecting the css with StyleBot works for me.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:nsitedesigns
ID: 41847330
I emptied cache.  Still seeing badge on mobile devices.

I have the css in the plugin called simple custom css.

@media only screen and (max-width: 768px) {
  
 .footer-widgets-1, .footer-widgets-2, .footer-widgets-3, .footer-widgets-4 {
		width: 100%;
    text-align: left;
    padding: 40px 0;
	}


div.sitelock {
   display: none
} 

}

Open in new window


Here is footer code.
<div id ="sitelock" style="position: fixed; z-index: 1000; width: 164px; height: 98px; bottom: 15px; right: 15px;"><a href="#" onclick="window.open('https://www.sitelock.com/verify.php?site=sheboyganseniorcommunity.com','SiteLock','width=600,height=600,left=160,top=170');" ><img class="img-responsive" alt="SiteLock" title="SiteLock" src="//shield.sitelock.com/shield/sheboyganseniorcommunity.com" /></a></div>

Open in new window

0
 

Author Comment

by:nsitedesigns
ID: 41847335
I don't know what you mean by, "injecting the css with StyleBot"
0
 
LVL 20

Accepted Solution

by:
Russ Suter earned 2000 total points
ID: 41847354
I don't see that CSS referenced anywhere but even if it was it wouldn't work as you have it right now. To reference an element by id you would need to use div#sitelock. Right now you're using div.sitelock which will reference an element by class, not Id.
0
 

Author Comment

by:nsitedesigns
ID: 41847358
I changed how it appears in simple custom css
@media only screen and (max-width: 768px)  {
div#sitelock {
   display: none
} 

}

Open in new window



I am not sure why you are not seeing the code in this plugin.  Still not working.  : (
0
 
LVL 20

Expert Comment

by:Russ Suter
ID: 41847385
I'm still seeing nothing wrong with the CSS you posted here. I just don't see the reference to the CSS file on your website and the Inspector shows no evidence of the style existing.
0
 

Author Comment

by:nsitedesigns
ID: 41849173
Today it appears to be working fine.  Thanks for the help!
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question