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.

How do Page Builder row attributes work – row class, cell class and CSS styles

Open 23 replies pluginplugin-page-builder
11 years ago · Last reply by Andrew Misplon 9 years ago

If you edit any row in Page Builder (2.0+) you’ll notice an Attributes tab at the top right of the modal window. Opening that reveals three fields:

Row Class
Cell Class
CSS Styles

A similar option is available when editing Widgets. In this thread we’ll briefly cover row attributes and how to use them. This overview assumes a basic understanding of CSS.

Row Class

I’ve added a row class and called it:

test-row-class

If we now go inspect the page source we see that the very first div in the row looks like this:

<div class="panel-row-style-test-row-class test-row-class panel-row-style">

So now we have a custom row class that we can target in our own CSS, be it theme stylesheet, child theme stylesheet or Custom CSS.

Note that there is no period before test-row-class when I add it to the Page Builder field. However when I target that class in my CSS I do need a period in front of it.

.test-row-class {
/* My styles for test row class go here */
}

Cell Class

I’ve added a test cell class:

test-cell-class

Now let’s go inspect the page source and see where this is being applied:

<div class="panel-row-style-test-row-class test-row-class panel-row-style">
	<div class="panel-grid-cell" id="pgc-1459-0-0">
		<div class="test-cell-class panel-cell-style">

Now we can see both our row class and cell class being applied. As with our row class before we can now target this cell class in our own stylesheet, wherever that may be:

.test-cell-class {
/* My styles for test row class go here */
}

CSS Styles

Lastly let’s take a the CSS Styles field. This field will add inline styles to the row div. Not the cell div the row div. You can add one per line and don’t need a semi-colon at the end, for example:

color: red

Let’s take a look and see how that looks in the page source:

<div class="panel-row-style-test-row-class test-row-class panel-row-style" style="color: red;">
	<div class="panel-grid-cell" id="pgc-1530-0-0">
		<div class="test-cell-class panel-cell-style">

Now we can see all three row Attributes in play. Our row class, cell class and inline CSS Styles.

Conclusion

If you’ve got a handle on row attributes then widget attributes will make sense.

Feel free to post questions on this topic below.

Please, find an blog post on this topic here.

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

23
  1. Andrew Misplon Staff 11 years, 1 month ago

    Page Builder user documentation can be found here: Page: WordPress Page Builder Tutorial: How to Use the SiteOrigin Plugin.

  2. bsmith40 9 years, 4 months ago

    Hi Andrew

    I can’t get the above to work on wordpress 4.6.1 using modern themes bldr pro.

    absolutely nothing happens

    Ben

  3. Andrew Misplon Staff 9 years, 4 months ago

    Hi Ben

    Have you inspected the source code using your browser’s developer tool? The first item to confirm would be, is your custom ID or class outputting? Once that’s confirmed you can then go down the line and check your CSS by inspecting the item you’re targeting to see if your rule is perhaps being overridden by another rule with greater specificity.

  4. bsmith40 9 years, 3 months ago

    Ok, I’ll check.

    Let me explain what I’m trying to do and let me know if possible

    What I need is for a client to be able to turn on and off visibilty of a row or widget to front end page.
    Whould be great to have a siteorigen toggle for this.

    So in row edit i left id blank
    added row-a-class to row
    and added .row-a {visibility: collapse;}

    What do you think

  5. bsmith40 9 years, 3 months ago

    I see one thing I did wrong, should be visibility: collapse in edit rows> attributes> css styles

  6. bsmith40 9 years, 3 months ago

    But still now working. I wouldn’t know if it is getting blocked by viewing inspect mode

  7. bsmith40 9 years, 3 months ago

    Sorry meant still NOT working

  8. Andrew Misplon Staff 9 years, 3 months ago

    If you add:

    row-a-class

    to the row attributes class field then you’d need to add to your Custom CSS plugin or child theme style.css file:

    .row-a-class {
    }

    In your example above you initially mention row-a-class and then target that with .row-a .

    Also, if you use the CSS Styles field, you must only put declarations like:

    display: none

    That field can’t accept rules.

  9. Andrew Misplon Staff 9 years, 3 months ago

    You should do one of the following.

    Use a row class and matching Custom CSS:

    01

    02

    OR use CSS Styles but not both:

    03

  10. bsmith40 9 years, 3 months ago

    Ok , I did the very last example you have in the CSS Styles, but nothing happens.

  11. Andrew Misplon Staff 9 years, 3 months ago

    Please, send a link to the page concerned and we’ll take a look.

  12. bsmith40 Private 9 years, 3 months ago

    This is a private message.

  13. Andrew Misplon Staff 9 years, 3 months ago

    I can’t seem to login with those details. Please, can you just send me the link to the post on the front end of your site. Thanks.

  14. bsmith40 9 years, 3 months ago

    Ok

    demo.com-products.co

  15. Andrew Misplon Staff 9 years, 3 months ago

    If you’d like to use Custom CSS then it’s really handy to inspect your code. If you don’t use your browser’s developer tool then you’re working in the dark, inputting rules and styles on one side but not able to check if they’re being outputted on the other. Here is a post on using the inspector: https://developers.google.com/web/tools/chrome-devtools/inspect-styles/. There are many others, that’s just one that came up when I checked.

    display: none isn’t anywhere in your page source. I’m not sure why, but your styles aren’t being outputted to the page. That row has an ID of home-testimonials so in your Custom CSS plugin of choice you could say:

    #home-testimonials { display: none; }
  16. bsmith40 9 years, 3 months ago

    Ok, thanks for the inspector link.

    Using the custom css will help to a degree. I really was needing our client to be able to just type in the “none” in the pages row edit area. The client would not have access to Custom CSS so they wouldn’t be able to customize there page in that way.

    Any way to find out why it’s not working? Is it a glitch in siteorigin or coulkd another plugin be blocking it?

    Thanks for your help

  17. bsmith40 9 years, 3 months ago

    This is strange, putting #home-testimonials { display: none; } into Custom CSS isn’t working either

  18. Andrew Misplon Staff 9 years, 3 months ago

    A caching plugin could be the reason. Is there one being used?

    What Custom CSS plugin are you using?

  19. bsmith40 9 years, 3 months ago

    Simple Custom CSS By John Regan, Danny Van Kooten

    I deactivated it and it didn’t help the Row CSS

  20. bsmith40 9 years, 3 months ago

    I haven’t installed a caching plugin. I am using BLDR by modern themes which has revisions history logged at bottom of page.

  21. Andrew Misplon Staff 9 years, 3 months ago

    Who is the site hosted with? GoDaddy, for example, has a caching link at the top of the page in WP? Can you perhaps open a new support thread and I’ll try to assist further there. This is quite specific now, your row attributes aren’t reflecting: Page: New Thread. If you send me the link to your thread once open, I’ll assist. Thanks.

  22. bsmith40 9 years, 3 months ago

    Thanks Andrew

    I’m using Hostgator

    New thread
    Page: SiteOrigin – Free WordPress Themes, Plugins, and Page Builder

  23. Andrew Misplon Staff 9 years, 3 months ago

    Thanks

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