Solved

Controlling space under text from one style to another

Posted on 2010-09-21
3
296 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 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

Technology Partners: 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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

707 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