Els <el*********@tiscali.nl> wrote:
Yes,
<p>first text</p>
<p class="second">second text</p>
And in your styles (so it'll work for all pages with a 'second-
class paragraph'):
p.second{margin-top:80px;}
This is mostly off-topic for this group (and better suited for
c.i.w.a.stylesheets), but there are HTML issues involved in the sense
that HTML elements have some _default_ rendering in browsers. Partly this
behavior is (obscurely) described in the sample style sheets for HTML in
CSS specifications.
It is important to note in cases like this that paragraphs (p elements)
generally have a default top margin and a default bottom margin.
Moreover, by CSS rules the actual spacing between two consecutive p
elements is the larger of the first element's bottom margin and the
second element's top margin.
Thus, p.second{margin-top:80px;}, if applied by a browser, will set a
_minimum_ vertical spacing between the paragraphs. It is quire probable
that it will also set the actual spacing, but there is really no law
against using a browser with, say, a font size of 100 pixels, in which
case the first paragraph's bottom margin is probably larger than 80
pixels.
The morale is that you should normally not use the px unit but set e.g. a
top margin using the em unit, which equals the size (height) of the font
in use.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html