...

View Full Version : DOCTYPE above the html tag



abbas
09-28-2006, 10:24 AM
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

Bill Posters
09-28-2006, 11:20 AM
ůSo what have I missed.
The last six years of progress in web development, I'd say. ;)

CSS (http://www.w3schools.com/css/)

ronaldb66
09-28-2006, 12:50 PM
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:

body {
margin: 0;
background-image: url(background03.jpg);
background-color: #A8B6D0;
}

abbas
09-28-2006, 01:50 PM
Thanks ronaldb66 for your help. And to the other helpful person,,,,,,,

Abbas



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum