Changed last-child to first-child to fix #13325

Fixes #13325.
Fixes incorrect margin fix as the right most element will actually be the first in the DOM.
As noted by @jerem