2 replies [Last post]
mayonaise
Offline
Regular
Last seen: 16 years 3 days ago
Joined: 2004-08-06
Posts: 29
Points: 0

adding this code seems to create a permanent margin around the entire page that i can't get rid of.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

position: absolute;
top: 0px;
left: 0px;

positions the object at about 5 pixels from the top left. i've never used these standards-modes before...

in firefox it also forces my content to the left of the screen, even though i have it centered

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

&lt;!DOCTYPE...&gt; inserts page margins??

Hi mayonaise,
Have you tried using margin:0; padding:0; on body and html.
html, body{margin:0; padding:0;}

Hope that helps

mayonaise
Offline
Regular
Last seen: 16 years 3 days ago
Joined: 2004-08-06
Posts: 29
Points: 0

&lt;!DOCTYPE...&gt; inserts page margins??

Tony wrote:
Hi mayonaise,
Have you tried using margin:0; padding:0; on body and html.
html, body{margin:0; padding:0;}

Hope that helps
i did try that, or at least i thought i did, and it wasn't working. maybe my browser was just loading cached content... anyways, seems to be working now. thanks!