Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    australia
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 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
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by abbas View Post
    …So what have I missed.
    The last six years of progress in web development, I'd say.

    CSS

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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; 09-28-2006 at 01:55 PM. Reason: Expanded answer
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #4
    New Coder
    Join Date
    Dec 2003
    Location
    australia
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks ronaldb66 for your help. And to the other helpful person,,,,,,,

    Abbas


  •  

    Posting Permissions

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