PDA

View Full Version : Is it possible to skip line between "headtext" (H1) and rest of text (H2)?


kippie
08-17-2002, 06:01 PM
When previewing the HTML below there appears an open line between the "headtext" (with style H1) and the rest of the text (with style H2). Although there are no codes like <br>. Is it possible to make it so that there is no open line and that the rest of the text comes immediately under the headtext?

This is the HTML:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
<title>Welcome to Adobe GoLive 4</title>
<style type="text/css"><!--
#Home1 { background-color: #4169E1; position: absolute; top: 70px; left: 70px; width: 300px; height: 200px; padding: 20px; z-index: 13; overflow: auto; visibility: visible; visible }
H1 { color: #191970; font-weight: 400; font-size: 18px; font-family: Arial; text-align: justify; width: 100% }
H2 { color: #191970; font-size: 10pt; font-family: Arial; text-align: justify }
-->
</style>
</head>
<body>
<div id="Home1"><br>
<H1>This is text with style H1</H1>
<H2>And this is text with style H2 </H2>
</div>
</body>
</html>

Kippie

La Gal
08-17-2002, 06:37 PM
To reduce or increase the space around header tags simply adjust the margin properties. The default value for the margins is 0, so you need to use negative values to reduce the margin.

h1 { marin-top: -10px; margin-bottom: -10px; }
h2 { margin-top: -10px; margin-bottom: -5px; }

brothercake
08-17-2002, 08:23 PM
h1 is a block-level element, so it will always create a line break. If you define <big> the same as <h1> you can use it that way:


h1,big { color: #191970; font-weight: 400; font-size: 18px; font-family: Arial; text-align: justify; width: 100% }


then


<big>This is text with style H1</big>
<H2>And this is text with style H2 </H2>

kippie
08-18-2002, 01:08 PM
Thanks
Kippie