Jump to content

manual -> 'auto row' always?


joe_g
 Share

Recommended Posts

Hi,

testing continues!

Is there a way to ensure that layout is always 'auto row' for every element?

I've got a client editing long pages and once she start adding and moving stuff around elements tend to shift to manual from auto row. I'm not sure when exactly. The problem then becomes when she tries to insert new content and the order becomes (for her) a bit random, as things get pushed down "around" the manually placed elements.

J

Link to comment
Share on other sites

That is absolutely beautiful, thanks. I realise i should have read the docs better, so starting now :)

I added it here (better than in my own css?) - seems to work

So the difference is pg-item-added is what they initially get when dragged, then pg-item is what they always have - or something like that?

image.thumb.png.971d1218f3c43840299b44f1db7521b6.png

  • Like 1
Link to comment
Share on other sites

You can put it in the CSS code field on the module settings like you did or load it inside a CSS file, both is fine.
 

  On 3/27/2025 at 12:41 PM, joe_g said:

So the difference is pg-item-added is what they initially get when dragged, then pg-item is what they always have - or something like that?

Expand  


See this example and comments for clarification:

/* this overwrites the default for all items */
.pg .pg-item {
   grid-row-start: auto; 
}

/* this is only affecting new items, e.g. size can still be changed later by resizing items, if you want to set a default size it's better to use this class */
.pg .pg-item-added {
   grid-column-end: span 3; /* let new grid items span 3 columns */
   grid-row-start: auto; /* you can also change the placement here */
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...