Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Controlling space under text from one style to another

Posted on 2010-09-21
3
Medium Priority
?
300 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses

609 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