Follow by Email

Saturday, September 3, 2016

Remove padding beneath H3,h2,ui tag

I was developing a printer friendly HTML page and was facing a problem where H2,h3 and ui tags were adding extra spaces at top and bottom of the text.

Thanks to the below stackoverflow answer I found out that there is a default margin and padding in these tags and had to write a small css to override those

h3{ padding: 0px; margin: 0px; }
ui{ margin: 0px; }

notice that I am not using padding:0 for ui because if I do it is going to remove the padding and my ui will not appear aligned with the border which I don't want.

No comments:

Post a Comment