MyBB Community Forums
How to set negative margin on last child post row? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: How to set negative margin on last child post row? (/thread-237614.html)



How to set negative margin on last child post row? - Grimlogic - 2023-02-04

In my forums, I've set a margin for the .post attribute so that there's a break in between each post row, but this also creates an unwanted space on the last child post row.

.post {
	overflow: hidden;
	background: #12151a;
	margin: 0 0 5px 0;
}

The spaces circled in green are intentional, but how do I remove the one circled in red? Basically, I want the last child post row and the tfooter to be seamless.


I've tried editing some of the attributes in css3.css but I'm not able to see results.

[Image: eCWSfcb.png]


RE: How to set negative margin on last child post row? - SvePu - 2023-02-04

Maybe:
.post:last-of-type {
	margin: 0;
}



RE: How to set negative margin on last child post row? - Grimlogic - 2023-02-04

It works great. Would never have been able to figure that out on my own. Thank you!