• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Controlling space under text from one style to another

I'm attaching a screen grab.  I want to control the space below my h1 style to my body copy style.  I must be getting old, because I cant figure out what CSS rule to apply to my h1.  I want the space between the h1 and body copy to be less than a normal carriage return.  What is the rule I apply to hi, or is it a rule I apply to the bodyCopy tag below? current alignment between blue type (h1) and black type below (bodyCopy)
0
Revolution9
Asked:
Revolution9
  • 2
1 Solution
 
wuffCommented:
I'm not sure if I understand you right but it seems like you would like to use

h1 { padding-bottom: 1em; }

You can also specify in pixels

h1 { padding-bottom: 12px; }

Would also be nicer if you use padding to the left and right too (use the CSS words padding or padding-left/padding-right)

0
 
wuffCommented:
Of course you should also add the margin. Make sure that the body text has correct margin and padding too. Easiest is to "reset" all elements to zero margin and padding first.

* {
  margin: 0;
  padding: 0;
}

h1 {
  padding: 12px; 10px;
}

This will put 10 pixels of padding to the left and right and 12 pixels below and above.

0
 
Revolution9Author Commented:
Great!  Thanks so much.  Putting up another html question in a few minutes.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now