SitePoint Sponsor

User Tag List

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

    Post Top Margin Problems with Strict DTD

    I am working on my web page to have my own personal list for HTML Character Entities. I got the padding where I wanted it to be and it looks just fine. Until I inserted the Strict DTD...

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    and all of a sudden the header dropped down about 35 - 50 pixels. I don't want to use Transitional any suggestion? Thank you.

    Here is my web page with the DTD...

    http://www.meetkenyans.com/xhtml/htm...ies_page1.html

    Here is another web page using the same code but no DTD...

    http://www.meetkenyans.com/xhtml/htm...ies_page2.html
    Last edited by webdevmac; Dec 4, 2006 at 19:55. Reason: Correction

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the default margin on the p which holds your heading. You should actually use a heading (ie h1 - h6) for that cos, well, that's what it is.

  3. #3
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen
    It's the default margin on the p which holds your heading. You should actually use a heading (ie h1 - h6) for that cos, well, that's what it is.
    Thank you it worked. I got rid of that <p> tag and replaced it with a <h1> tag instead. I made my h1 {margin: 0px;} and worked like a charm. I figured it was something simple, but I could not see it at a glance.


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
  •