This hadn't hit me until now (and this is not only in webkit browsers). On all texts in like p
tags, h1
tags etc... there's an extra space over and below the text.
In chrome I found this:
user agent stylesheet
-webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px;
This makes the alignment wrong in some places. And yes I'm using a reset stylesheet and no padding or margin are added. Pretty much a basic setup. Why is this and how do I solve it?
No, plain text has no default margin. Besides, if there were a margin, it would appear outside the border; the spacing between content and border is padding.
Margins on text is controlled by STYLE="margin: ", which is a style that can be used on all types of text section, including the BODY tag. Written like this, you specify all four margins in one take.
You can also directly modify those attributes like so:
-webkit-margin-before:0em; -webkit-margin-after:0em;
Works for me in Chrome/Safari. Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With