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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

div's in IE with width: 100%

Status
Not open for further replies.

Jen53403

Programmer
Jul 17, 2006
22
For the following code example, IE does not stretch the image all the way to the right, while other browsers do. How can I fix this to work as it should in IE too?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
	<title>Gray background stretch</title>
</head>
<body>
<div style="position: absolute; top: 0px; left: 0px; width: 100%">
	<img src="gray.bmp" alt="body" style="position: relative; left: 0%; top: 0px; width: 100%; height: 200px;">
</div>
</body>
</html>

gray.bmp is just a 100x100 px image.

Thanks!
 
Thank you very much. I love easy solutions!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top