SitePoint Sponsor

User Tag List

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

    Post Another margin problem with Strict DTD!



    I have almost completed my web page and now I have inserted a link toward the bottom of the page. The two links below show everything is identical except the "Back to Top" button has a different margin between the dotted border and the button itself.

    With DTD...

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


    Without DTD...

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

  2. #2
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With DTD "standards mode".
    Without DTD "quirks mode".

    You can't change the rules and expect the browser to act the same. The very first thing you do is set the doctype, not after the coding is finished. This may not be the reason for the problem but ...

    I do not see any difference between the two pages.

  3. #3
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you look at the "Back to Top" button at the bottom. That is where you will see the difference using Safari and FF with Mac, and IE, NS, and FF on Windows.

  4. #4
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did set the doctype first, but there is still a margin issue.

  5. #5
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick note: I see it now, I think. In IE6 it's different but I'm heading out the door.

  6. #6
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    Posts
    1,424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you just pointing out it looks different without a doctype and then it looks different still further on Windows? I am not fully sure I understand what the problem is - the default/margin and padding on various elements will vary from browser to browser.

    Many use the universal selector to zero things out for 99% of the elements:
    * { margin: 0; padding: 0; }

    Perhaps it will help - I don't have Windows available - I need a new Mac so I can run it .


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
  •