Skip to content

Making the widget disappear

November 15, 2012

My widget, unlike the one on Rod’s page, is not in an iframe. So, I thought naming the <p> (tried both class and id) in and then setting {display:none;} for that name in the handheld css would do the trick as it had done with image elements. No so. Your assistance would be appreciated.

10 Comments leave one →
  1. November 15, 2012 4:25 pm

    I had same problem with RSS Icon. Page 191 from Castro used .hise {display:none}. So, I changed a class name to “hide”

  2. derek permalink*
    November 15, 2012 4:51 pm

    you can also do #main_right p.widget {display:none;}

  3. jayon615 permalink
    November 15, 2012 6:33 pm

    Neither solution works to remove the widget, unless I’ve not executed the code properly (certainly possible). I’m thinking this widget works independently of it’s p-element. Interestingly, when I remove the main-right navigation entirely for the ‘print’ css, then it goes away. The widget isn’t too terribly wide and I’ve spent a disproportionate amount of time trying to erase it for the mobile css. I may just leave my attempt at coding it away for the record and take my lumps.

    On a related note, there will be no urls in our print version of this page (all pictures)–with footer and main-right gone. So, even though we may have coded to properly display the url associated with a link, the only way this can be known is by looking at the print css code. Have I missed something?

  4. November 16, 2012 11:28 am

    I’m having the same problem. I was able to remove the RSS button through the img class, but like jayon615, no luck with the widget.

    I’m using the worldcat search box on my page, code is:

    Search for an item in libraries near you:
    Enter title, subject or author >>

    With that in mind, what do I need to put in my mobile_css to get this to hide?

    Here is the page if that helps

  5. November 16, 2012 4:19 pm

    My widget was an RSS feed. I added a division and gave it an “id.” This gives you freedom to display or not display in your style sheet. I did some nail biting over whether this would be considered an elegant solution, but apparently anything that involves CSS is generally considered best. Or so I believe.

    • jayon615 permalink
      November 16, 2012 5:46 pm

      Brilliant Tom! After literally hours of trying to make the p-element with the widget disappear, surrounding the whole thing with a named div and then addressing that in the style sheet was the answer. Thanks.

      • November 16, 2012 6:03 pm

        I hope this is not considered cheating. But glad it helped.

      • November 17, 2012 10:05 am

        I see in another similar discussion above this one Derek recommends the same thing.

  6. November 16, 2012 4:28 pm

    Perhaps I meant to say doing it with an external style sheet was more elegant than doing it inline. –Tom

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: