Web Analytics Made Easy -
StatCounter DOCTYPE above the html tag - CodingForum

Announcement

Collapse
No announcement yet.

DOCTYPE above the html tag

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DOCTYPE above the html tag

    Hello,

    I use Frontpage to design my web site. I've added the following script above the html tag on the index page.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    Then after the </head> tag Frontpage has added the following code
    <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" background="background03.jpg" bgcolor="#A8B6D0">

    so that the content will be at the very top, left side of the page etc. In IE the page goes to the extreme left, right, top etc as it was hoped it would, however when I view the page in Firefox it does not.

    So what have I missed.

    Cheers in advance

    Abbas

  • #2
    Originally posted by abbas View Post
    …So what have I missed.
    The last six years of progress in web development, I'd say.

    CSS
    Why you should validate your code before asking for help...

    Comment


    • #3
      Margins

      The margin attributes on the body element are not in accordance to the W3C recommendations and are therefore ignored by FireFox--as they should.

      The preferred method for controlling margins on the body element, and any other element for that matter, is to use Cascading Style Sheets (CSS); The same applies to the background and bgcolor attributes.
      I don't know how much FrontPage supports CSS these days, but a simple CSS rule for setting the body margins to zero and assigning a background image and color would be:
      Code:
      body {
      margin: 0;
      background-image: url(background03.jpg);
      background-color: #A8B6D0;
      }
      Last edited by ronaldb66; Sep 28, 2006, 08:55 AM. Reason: Expanded answer
      Regards,
      Ronald.
      ronaldvanderwijden.com

      Comment


      • #4
        Thanks ronaldb66 for your help. And to the other helpful person,,,,,,,

        Abbas

        Comment

        Working...
        X