Half a line after a title?

sebaz

New Member
I'm sure this is a very beginner type of question, but is there a way to make the space between a title and the following paragraph just half the space of a line instead of one full space? In Dreamweaver, if I press Enter after the title, sometimes it does one line, sometimes too. The only way to be sure that it doesn't leave two lines is to do Shift+Enter, which apparently inserts a <br> tag instead of a <p> one. I would just really like to leave half a line of space between the title and the paragraph, is there a way to do this?
 

Phreaddee

Super Moderator
Staff member
Not in design view.

Code:
H2 {
Font-size:16px;
Line-height:20px;
Margin-bottom:10px;
}

p {
font-size:14px;
Line-height:20px;
Margin:10px 0;
}

H2 + p {
Margin-top:0;
}

HTML:
<h2>header goes here</h2>

<p>paragraph goes here, with half line space</p>
<p>paragraph goes here, with normal spacing</p>
 

sebaz

New Member
Sorry, I'm missing something, why are there two blocks of code, one named code and the other html code? Also since I'm currently using an embedded font with a lot of code for that (which includes a stylesheet.css file and a reference to it in the page code) wouldn't this new code mess with that other code?
 

Phreaddee

Super Moderator
Staff member
The top block is css
The bottom block is html.
It is an example, twist it to your own needs.
 

artimes

New Member
Phreaddee's way is probably better but you could also do this:

<p><span style="font-size: 15pt">your heading</span></br>
the rest of your text</p>
 

ronaldroe

Super Moderator
Staff member
Phreadee's way is better. The problem is, we've run into someone who only knows how to use design view.

@sebaz: I don't know if you're an actual designer or a site owner who's just keeping up their own site. If you're a designer, put Dreamweaver away and learn to code by hand. If it's the latter, I'd suggest you keep doing what you're doing, but make a quick run through the tutorials for HTML and CSS at http://www.w3schools.com
It will give you a good idea how to deal with these situations when they arise, and who knows, maybe you'll love it and it'll become your next hobby/business venture. That's how I got into it.
 
Top