Home>Support>Remove padding-left of panel-grid-cell:first-child and padding-right of panel-grid-cell:last-child

Remove padding-left of panel-grid-cell:first-child and padding-right of panel-grid-cell:last-child

By Andris, 9 years ago. Last reply by Magus, 9 years ago.

Hey friends.

Thanks for the grandiose page builder, but I try to remove the padding on the left side and the padding on the right side of a row that’s divided into cells. So I tried this:

.panel-grid-cell:first-child {padding-left:0;}
.panel-grid-cell:last-child {padding-right:0;}

But my styles were always overwritten, cause of some inline-styles that were added with an ID, which – of course – will overwrite my class styles. The thing is that I wanna do this globally. Can anybody help?

URL: http://www.ibl.ch/licht/derendingen-mitte

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

  1. 9 years, 4 months ago Magus
    Hi, I Work Here

    Hi Andris

    You can force the page to use your css by using the !important attribute. Please try changing your CSS to read

    .panel-grid-cell:first-child {padding-left:0 !important;}
    .panel-grid-cell:last-child {padding-right:0 !important;}
    

    The !important attribute isn’t always required but in some cases is necessary.

    Let us know how you get on

    Magus

  2. 9 years, 4 months ago Andris

    Hey Magnus

    Thanks a lot. That totally did the trick. I didn’t know about that !important-rule.

    Have a great day.

    Andris

  3. 9 years, 4 months ago Magus
    Hi, I Work Here

    Hi Andris

    Glad to hear. If you need any more help, please feel free to open a new support thread.

    Magus

    • 9 years, 4 months ago Andris

      Hey Magus (sorry for spelling your name wrong last time)

      Too bad. I got an new issue now.

      If I split the row into more that two cells – like here: http://www.ibl.ch/licht/stampfli-ag – the middle cell is now less high that the outer cells. Do you know a way to even that out?

      Andris

  4. 9 years, 4 months ago Magus
    Hi, I Work Here

    Hi Andris

    I have just checked and all looks good to me, did you resolve the issue?

    Magus

    • 9 years, 4 months ago Andris

      Hi Magus

      No, i didn’t. The middle image is still less high than the outer two. Maybe I have to give it a different height in photoshop.

      Andris

  5. 9 years, 4 months ago Magus
    Hi, I Work Here

    Hi Andris

    I see what you are talking about. You are correct the discrepancy is due to the image itself rather than the way it renders on the page. The featured item in the middle image is slightly smaller than the others and sits lower on the canvas. This would have to be altered in photoshop. It can be quite difficult to maintain a set image size when working with photographed items.

    The best way I have found round this is to cut the featured item from the image and add it to a fixed size canvas, then resize the pasted layer to fill the canvas area. That new image can then be pasted onto another larger fixed size image to give it the frame. It’s a bit more work but does give a nice consistent result.

    Hope this helps

    Magus

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