WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-27-2005, 07:51 PM
WebProWorld New Member
 

Join Date: Jan 2005
Posts: 16
postUre RepRank 0
Default <h> tags

I want to add <h> tags on my site. I set the <h> tags up in the cascading style sheet. When I try adding the <h> tag into the html I notice that it creates extra space between the copy with the <h> tag and the next line of copy. Is there anything that can be done so that the <h> tag doesn't create that extra space between the lines?
__________________
postUre

FitCare Products
http://www.airfitbackrest.com
Reply With Quote
  #2 (permalink)  
Old 04-27-2005, 08:44 PM
WebProWorld Member
 

Join Date: Jan 2005
Posts: 36
GuyLaDouche RepRank 0
Default

Add the following to your <hn> declarations:

padding: 0;
margin: 0;

Headings, by default, have the whitespace added to them as there usually is space between copy and headings in most instances.
Reply With Quote
  #3 (permalink)  
Old 04-27-2005, 09:53 PM
WebProWorld New Member
 

Join Date: Jan 2005
Posts: 16
postUre RepRank 0
Default

what do you mean by "declarations" ?

Thank you.
__________________
postUre

FitCare Products
http://www.airfitbackrest.com
Reply With Quote
  #4 (permalink)  
Old 05-02-2005, 06:26 PM
Narasinha's Avatar
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Urbana, Illinois, US
Posts: 306
Narasinha RepRank 1
Default

Quote:
Originally Posted by postUre
what do you mean by "declarations"?
The declarations are where you "declare" the attributes of the particular tags within the Cascading Style Sheet.

In the style sheet, you probably have something like this for your header tags:

Code:
h1  {font-weight: bold;
    font-size: 180%;
    text-align: center;
    color: #333366;
    font-family: "Times New Roman", Times, serif}
To control the space added above and below the heading, you need to use padding and/or change the margins. Add the information to your style sheet like this:

Code:
h1  {font-weight: bold;
    font-size: 180%;
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    text-align: center;
    color: #333366;
    font-family: "Times New Roman", Times, serif}
You can specify the margin (spacing outside the object) or padding (spacing inside the boundaries of the object) using whatever units you prefer, such as pixels (i.e. 4px). If you want all four sides to have the same value, you can specify it just once (i.e. margin: 4px). If you want to use different values for each side, specify all four values, clockwise, starting from the top. So, specifying margin: 4px 0 4px 1em; would give you margins of 4 pixels on top and bottom, none on the right, and 1 em unit on the left.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0