Solved

Controlling space under text from one style to another

Posted on 2010-09-21
3
284 Views
Last Modified: 2012-05-10
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
Comment
Question by:Revolution9
  • 2
3 Comments
 
LVL 3

Expert Comment

by:wuff
ID: 33724510
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
 
LVL 3

Accepted Solution

by:
wuff earned 500 total points
ID: 33724616
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
 

Author Closing Comment

by:Revolution9
ID: 33724772
Great!  Thanks so much.  Putting up another html question in a few minutes.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now