Home>Support>Hiding component in PageBuilder when used by a Mobile device

Hiding component in PageBuilder when used by a Mobile device

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Based on a previous thread I tried to use the following code to hide the site-builder component when a media device is used:

@media screen and (max-width: 960px) {
.widget_text { display: none !important; }
}

I’m using the following process to define the CSS: Edit (on the component)-> Widget Class (I entered a name for the class) -> Mobile CSS Declarations (Entered the CSS code above here).

Is this process correct, because the CSS does not take effect.

Any assistance regarding the matter will be greatly appreciated.

Kind regards,
Reinhard Behrens

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 9 hours ago Andrew Misplon
    Hi, I Work Here

    Hi Reinhard

    Thanks for reaching out.

    A declaration is made up of a property and a value. For example, color is a property and red is a value.
    color: red
    https://www.w3schools.com/css/css_syntax.ASP

    Your example above is a CSS rule or ruleset wrapped in a media query.

    I wrote a short guide on this topic Post: A Custom CSS Guide to Page Builder Row, Cell & Widget Attributes.

    The CSS in your question should be inserted at AppearanceCustom CSS if you’re using SiteOrigin CSS. Finally, edit the widget in question and insert widget_text without a period in the CSS Class field.

    SiteOrigin Premium includes a Toggle Visibility addon to make this process easier, more on the Toggle Visibility addon at the following link Page: Toggle Visibility.

  2. 5 years, 8 hours ago Reinhard Behrens

    Thank you Andrew, I installed the SiteOrigin CSS editor and added the exact line of text in my original CSS and the component was disabled when I shrunk my browser. Thank you very much for the quick response and in-depth answer.

    Have an awesome day!

  3. 5 years, 7 hours ago Andrew Misplon
    Hi, I Work Here

    Super, glad to hear you’re making progress. All the best with your website.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More