SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist spoondevil's Avatar
    Join Date
    Jun 2001
    Location
    Harlow, Essex, UK
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange 1 Line Space at Top of DIV

    I have a div on my page for the main body text so I can control the height of the page, and it produces a 1 line space before it writes and of the content. The code I am using is
    Code:
    <div class="frame-standardpage">
    <h1>Page Title</h1>
    <p>Page content goes here...</p>
    </div>
    and the CSS is
    Code:
    .frame-standardpage {
    	overflow: auto;
    	height: 326px;
    	width: 505px;
    	padding: 2px;
    }
    Any help would be great.

    Ta... Ian

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    set margins and paddings to 0 ,*{margin:0;padding:0;}, and then adjust

  3. #3
    SitePoint Evangelist spoondevil's Avatar
    Join Date
    Jun 2001
    Location
    Harlow, Essex, UK
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers.

    I found that it wasn't the margin or padding in the DIV tag that needed editing, it was the H1 needed the top margin set to 0px.

    Ta... Ian


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
  •