WordPress.org

Ready to get started?Download WordPress

Forums

Widgets on Pages
[resolved] CSS Targeting (7 posts)

  1. Adam
    Member
    Posted 1 year ago #

    Hey Todd,

    I'm having trouble targeting a whole individual widget. I want to hide one in the iPhone space, but I'm getting nowhere with these selectors:

    #*widgetID*
    #*widgetID* ul
    #*widgetID*.widgets_on_page

    http://wordpress.org/extend/plugins/widgets-on-pages/

  2. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

    Hey there, do you have a link I can take a look at?

    Ta,
    Todd

  3. Adam
    Member
    Posted 1 year ago #

    Sure thing. http://www.erdagardens.org

    Thanks!

  4. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

    Had a look but not sure what you mean by iphone space?

    If though you want to target an individual Widgets on Pages sidebar you could do something like this;

    .widgets_on_page#Home_1 {
    display: none;
    }
  5. Adam
    Member
    Posted 1 year ago #

    Sorry, I don't know how I thought that was descriptive. :)

    By iPhone space, I mean the 480px max-width space.

    This is specifically what I'm doing, and when I reduce my browser window to an iPhone-ish width, the widget stays:

    @media only screen and (max-width: 767px) {
      .widgets_on_page#home_5 { display: none; }
    }

    Seems to me at a max-width of 767 it should be long-disappeared by the time the browser window gets that thin.

    And thanks! It'd be a delight to get that front page a little cleaner in the mobile space.

  6. toddhalfpenny
    Member
    Plugin Author

    Posted 1 year ago #

    Hey again,

    I have added this to the base of you style-mobile.css and it does what you want I think;

    @media only screen and (max-width: 767px) {
      .widgets_on_page#Home_5 { display:none;}
    }

    Looks like you weren't using the correct case for Home_5 ID.

    Ta,
    Todd

  7. Adam
    Member
    Posted 1 year ago #

    Crazy. I didn't realize it was case-sensitive. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags