Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unwanted spaces with div 1

Status
Not open for further replies.

JKdesignz

Technical User
Feb 2, 2005
18
0
0
NL
I encountered a little problem, while I was working on a new page. I was working on it for a few minutes and already something didn't work out as I would like to.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">[/URL]

<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
		<head>
		</head>
		<body>
			<div style="position: absolute; left: 0px; top: 0px; background-color: green; width: 100%; height: 10%;"></div>
		</body>
</html>
Notice that when you load the page some space will appear on the right of the div, how can i make this space go away?. Can ne1 help me out on this one?

Thou shalt be victorious!!
 
It looks fine in FireFox, and will look the same in IE with
Code:
 <body style="margin: 0; padding: 0;">

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Since you're at the early stages of the design: ditch absolute positioning, go with relative (i.e. preserve normal document flow). And follow Greg's advice.
 
allright, it works! thx a lot!! ow and vragabond, i'm must mention i'm sorry for what happened with my other thread, it won't happen again

Thou shalt be victorious!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top