The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Vertical padding in UL using table-row markup
Hi all – I’ve defaulted to the solution in this article: https://stackoverflow.com/questions/10428720/how-to-keep-indent-for-second-line-in-ordered-lists-via-css.
Which works wonderfully, however, I’ve lost my vertical padding within the UL. Padding-bottom doesn’t seem to do much now that I am using table-row and table-cell.
Any ideas on how to fix this?
Cheers
A Codepen demo of the issue would be helpful here….but I suspect this will need to be solved by wrapping the text in a span and padding that
Looking to add vertical padding to this: https://codepen.io/cives/pen/xYoxJx
Yeah…on researching this you need an element to represent the td inside your table row…and apply the padding to that.
td
The text can’t perform that function…but, fortunately, that’s what you’ve used for the pseudo-element.
So..applying padding to that seems to do the trick.
https://codepen.io/Paulie-D/pen/aqgvdX