SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Style Sheet text alignment problem

    Hi everyone,

    Here's a simple HTML page with three embedded Style sheet elements. When viewed through an Internet Web Browser the text Test1, Test2, and Test3 appears as if extra line spacing (or an extra return character) is used above and beneath the text. I would like to decrease or completely eliminate the extra line break/spacing between the text. I'm not sure where to begin, there is no <BR> or other HTML element to validate the spacing. In the style sheet, can I say I want 0 pixels of spacing between these lines of text, or specify a set pixel spacing between lines of text?

    Any Ideas/Suggestions will be greatly appreciated!
    Thanks in advance!
    -Chibi_neko

    -------code below----------
    <html>
    <head>
    <STYLE TYPE="text/css">
    H1 {
    font-family: "Arial", Helvetica, sans-serif;
    font-size: 24; color : #0f479f;
    font-weight: 100
    }
    H2 {
    font-family: "Arial", Helvetica, sans-serif;
    font-size: 24; color : #0f479f;
    font-weight: 100
    }
    H3 {
    font-family: "Arial", Helvetica, sans-serif;
    font-size: 18; color : #0f479f;
    font-weight: 200
    }
    </STYLE>
    <head>
    <body>
    <H1>test1</H1>
    <H2>test2</H2>
    <H3>test3</H3>
    </body>
    </HTML>

  2. #2
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    H* tags are preformated, to alter the space above and below them, use margin: 0px; alternatively if you wanted spacing at the top and not at the bottom you could use something like margin-top: 20px; margin-bottom: 0px;

    hope that helps

  3. #3
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks iTec,
    Your sample works perfect!
    -Chibi_neko


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •