WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Ravage Theme] List item spacing between items on Recent Post widget inconsisten (5 posts)

  1. Jack
    Member
    Posted 1 year ago #

    I have a "Recent Post" widget the sidebar of my blog and I just noticed there isn't a space between the first list items even though there is a space between the other 3 items. I tried deleting the second item (which had two lines) but it still made the second item run up against the the first title. Has anyone seen this before?

    I have tried changing the .widget ul li { margin-bottom..} but it will just change the spacing for all the other elements and the first and second items will still have no spacing.

    Thanks in advance!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    That strange behavior is being caused by a style applied only to the first items on the list -- not clear why the style is there at all, but if you delete this, it fixes it:

    .widget ul li:first-child {
        float: right;
        margin: 0;
    }
  3. Jack
    Member
    Posted 1 year ago #

    Awesome thanks! I saw that and played around with the spacing, but I didn't think to just delete it. Worked like a charm. Thanks!

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You could also have put "float: none;" and it should have done the same thing. Do be aware that when the theme is updated, you'll lose that change, so make a note of it. Generally, you should not make changes in theme files -- but use a child theme or custom CSS option or plug-in -- that way your changes won't be lost. If you want to set that up, you'd just add this CSS -- which should override the old (bad) one:

    .widget ul li:first-child {
        float: none;
    }
  5. Jack
    Member
    Posted 1 year ago #

    Thanks! I should be better about not changing the theme styles...

Topic Closed

This topic has been closed to new replies.

About this Topic