Hi there
Does anyone know of a way to override to spacing that H1 - H6 puts around text?
In other words I want to be able to code
<H4>This is a heading</H4>
This is a paragraph.
and have it render as
This is a heading
This is a paragraph
as opposed to rendering as
This is a heading
This is a paragraph
Is this possible?I believe it is the line-height (<!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">http://www.w3.org/TR/CSS2/visudet.html# ... ine-height</a><!-- m -->) property.
Jona<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Style-Type" content="text/css">
<title>Example</title>
<h1 style="margin-bottom:0em">Example</h1>
<p style="margin-top:0em">Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>I thought you used display:inline; because it is a block level element and you want it to render as an inline element.Yes, you could use it inline though the headings have "semantic value and meaning" and were specifically designed to be block level elements that is why Charles rightly chose margin as the most appropriate solution to the problem.Then I am enlightened. At least more than I was, anyway.I am glad you could follow the reasoning, to understand correct usage of CSS, sometimes you have to look at bare HTML structure from a semantic stance .Does:
h4+p{margin-top: 0}
work in IE6/Win and IE5/Mac?It does not seem to work on M$ IE 6.0 for Windows.
Does anyone know of a way to override to spacing that H1 - H6 puts around text?
In other words I want to be able to code
<H4>This is a heading</H4>
This is a paragraph.
and have it render as
This is a heading
This is a paragraph
as opposed to rendering as
This is a heading
This is a paragraph
Is this possible?I believe it is the line-height (<!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">http://www.w3.org/TR/CSS2/visudet.html# ... ine-height</a><!-- m -->) property.
Jona<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Style-Type" content="text/css">
<title>Example</title>
<h1 style="margin-bottom:0em">Example</h1>
<p style="margin-top:0em">Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>I thought you used display:inline; because it is a block level element and you want it to render as an inline element.Yes, you could use it inline though the headings have "semantic value and meaning" and were specifically designed to be block level elements that is why Charles rightly chose margin as the most appropriate solution to the problem.Then I am enlightened. At least more than I was, anyway.I am glad you could follow the reasoning, to understand correct usage of CSS, sometimes you have to look at bare HTML structure from a semantic stance .Does:
h4+p{margin-top: 0}
work in IE6/Win and IE5/Mac?It does not seem to work on M$ IE 6.0 for Windows.