• Resolved chappie

    (@chappie)


    Having given my sidebar a background color, I needed to move all titles, icons, widget text and any other content away from the left and right edges of the container. The code I used did the job perfectly – but it also changed the margins in my FP and footer widget areas, causing havoc:

    /*  Widget area padding */
    .widget-area {
    margin-left: 5%;
    margin-right: 5%;
    }

    Could anyone please tell me how I can exempt the other parts of my page from this code? I tried using padding-left/right instead but it had no effect on my sidebar.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter chappie

    (@chappie)

    I’ve found the :not selector which looks handy. Is that is the right way to go about this — although I might have trouble if the non-sidebar elements on my page have variable margin settings since the :not syntax requires me to apply my code in reverse, ie apply a value to all other elements which aren’t .widget-area so that I can apply a different value to .widget-area. Hopefully, it doesn’t have to be this complicated.

    Did you try using .left & .right?

    .left .widget-area, .right .widget-area {...}

    Then margin/padding should work

    Thread Starter chappie

    (@chappie)

    Yay! Thank you, Dave.

    Now I’m annoyed with myself for not engaging logical brain last night. But it *was* late.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sidebar padding’ is closed to new replies.