This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Hiding component in PageBuilder when used by a Mobile device

5 years ago · Last reply by Andrew Misplon 5 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Andrew Misplon Staff 5 years, 6 months ago

    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. Reinhard Behrens 5 years, 6 months ago

    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. Andrew Misplon Staff 5 years, 6 months ago

    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.

Have a different question or issue?

Start New Thread