• Resolved freatz

    (@freatz)


    Hi!
    I’d like to know if it is possible to get rid of the padding and margin around the widgets?
    If I change the CSS (.widget), every widget is changed, including the 3 widgets in the Home page are affected. But I don’t want to change those.
    Is there a way to change this?
    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi, the following will do that and exclude the home page. This only applies to the sidebar widgets, not the footer widgets. I also included a declaration to remove the widget borders since with the padding gone, the text is right up against the border and readability suffers greatly.

    body:not(.home) .site-content #secondary .widget {
      padding: 0;
      border: none;
    }
    Thread Starter freatz

    (@freatz)

    Hi!
    It isn’t working ??

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hmmm, without seeing your site, it is nearly impossible for me to tell since I can’t see how you have your site configured, and it may very well be we need to adjust the CSS selectors used.

    Thread Starter freatz

    (@freatz)

    What worked was this:

    .widget {
    border: none;
    font-size: 14px;
    font-size: 1.4rem;
    line-height: 2;
    margin-bottom: 0;
    word-wrap: break-word;
    padding: 0;
    }

    Thank you very much! I wouldn’t have founded if you didn’t give me that idea ??

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    You are welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Widgets padding/margin’ is closed to new replies.