Reducing vertical spacing between blocks in sidebar

  • Hi,

    I have the lovecraft theme active on my site. I am using image blocks in the sidebar to drive visitors to key posts and pages on my website.

    I’d like to reduce the vertical spacing between each image block in the sidebar. How do I achieve that, using css code?

    Also, is there a way to justify text within image captions in the sidebar, but making it applicable only to text within the sidebar?

    I have attached a screenshot to explain. I hope it helps.

  • I’d like to reduce the vertical spacing between each image block in the sidebar. How do I achieve that, using css code?

    Your sidebar widgets are called “asides” and are wrapped under a “secondary” ID. You could use something like this to reduce that margin:

    #secondary aside  {
      margin:0;
      padding:0;
    }

    Also, is there a way to justify text within image captions in the sidebar, but making it applicable only to text within the sidebar?

    While it might be possible to justify captions in your sidebar using CSS, the column is too narrow and it will not look good. Justified text in narrow contexts creates “rivers” that affect readability negatively. Please see what I mean below:

  • Hi Alvaro,

    Thanks once again for the brilliant tip. It works!

    And your point is taken about the justification of narrow text. I really appreciate it!

  • Glad that these suggestions worked for you and thanks for keeping us updated.

  • The topic ‘Reducing vertical spacing between blocks in sidebar’ is closed to new replies.