Forum Moderators: open
You can't just insert Robin's code into the <h1> tag. You need to insert a style sheet in between the <head></head> tags of your page, for example:
<style>
<!--
h1 { font-family: Times New Roman; color: #000066; font-size: 36px; font-weight: normal; line-height: 40px; margin-top: 0px; margin-bottom: 0px; }
//-->
</style>
<style type="text/javascript"> ... </style>
but you are much better off if you put all of the style information in an external stylesheet:
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">@import url('stylesheet.css');</style>
Look at a newspaper and tell me "World War II WON!" belongs on the same lines of the fine details, it's not.
If you are creative enough to bend laws not ment to really be broken you can use CSS to get around the break lines after headers.
h1 {
display: inline;
}
Be aware that even I have come to conform and embrace headers as block level elements. :)
You can set margin-bottom to zero on one element (an H element in this case) but if the following element has a margin-top, then that margin-top amount will still render. The W3C margin collapsing rules say that when two element both have a margin, the browser should render greater one of the two but not the sum of the two.
So if you want a consitent look cross-browser, you can also set the margin of the neighboring element to zero or to something small. I like to use 4px.
Two or more adjoining vertical margins of block boxes in the normal flow collapse.
The resulting margin width is the maximum of the adjoining margin widths.In the case of negative margins, the maximum of the absolute values of the negative
adjoining margins is deducted from the maximum of the positive adjoining margins. If
there are no positive margins, the absolute maximum of the negative adjoining margins
is deducted from zero.W3C reference:
[w3.org...]