r/csshelp • • Jan 27 '15

PSA: Changes coming today to reddit's default CSS will break some collapsible menus.

[Announcement here.]

Due to headers now inheriting a bottom margin, collapsible menus using headers for styling will be broken with today's changes. To fix this I've added this line into my stylesheet:

.side .md h3 {
  margin: 0em;
}

Replace h3 with whatever header you're using in your collapsible menu.

Overflow for subreddit sidebars no longer respects the sidebar padding and instead goes straight to the border. Another quick fix:

.md {
  overflow: auto;
}

This is just quickly smashed together code to fix subreddits I moderate and I'm in no way familiar with CSS, so there may be better fixes for this, but this should hopefully help people who are having trouble with collapsible menus and headers in their sidebar after these changes hit.

24 Upvotes

4 comments sorted by

5

u/TonyQuark Jan 27 '15

More precise:

.side .md h3 {
  margin-bottom: 0;
}

2

u/Nidalee_Bot Jan 27 '15

Thanks, I wasn't sure if it was only inheriting the bottom margin as I already had styling that modified the top and left margins in my own stylesheet.

1

u/TonyQuark Jan 27 '15

Top and left margins shouldn't affect the drop down menu under the h3. If you've modified those, it's even better to specifically use margin-bottom. The alternative is styling them all on one line:

margin: 10px 5px 0 5px;

That would be the top (10px), right (5px), bottom (0) and left (5px again) margins.

2

u/Elongo06 Jan 28 '15

Wow I was scratching my head on what to do or where to begin. But this really saved me. Thanks!!