thehodapp
Sep 13 2009, 03:52 PM
I understand that headings place line breaks before and after the heading text. My question is how can I remove the line breaks using CSS?
I tried setting margins, padding, and line-height to 0, but that didn't work. I can't figure out what style property to use.
Christian J
Sep 13 2009, 04:53 PM
Headings are styled as block level elements by default. Try changing to inline.
If the heading is followed by a e.g. P element that must be made inline too.
Darin McGrew
Sep 13 2009, 06:16 PM
You need to set margin and padding to 0, but you need to do that both for the bottom margin and padding of the heading, and for the top margin and padding for the element that follows the heading.
thehodapp
Sep 14 2009, 02:54 PM
Thanks very much. I think I've got it figured out.
It had to do with the block level nature of the heading so I set it to inline and then put a <br /> before it.
I guess it works...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.