Solved

Controlling space under text from one style to another

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

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

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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 Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

730 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