100% width div in IE5.5

liunx

Guest
Hi,
This may have been asked before, but I've searched the web and usenet and not found an obvious answer...

I have the following (cut-down) html :

-----------------

<html>
<head>
<title>Morgans Website</title>
<style type="text/css">

#inner3 {
position: absolute;
top: 50%;
left: 0px;
width: 100%;
border-top: 1px solid #BB88EE;
border-bottom: 1px solid #BB88EE;
}

</style>
</head>
<body bgcolor="white">

<div id="inner3">
Hello
</div>

</body>
</html>

-----------------


In Mozilla & Konqueror it displays as I expect - 100% of the screen width, but in IE5.5 (the only one I have here) and Opera 6 it seems to be using only about 95% of the screen width.

Does anyone know if there's a work-around for this?

Billy.It has to do with the scrollbar. IE always leaves room for it unless you tell the body that you never want to scroll.

The problem stated simply, is how they define "100% of what". It is supposed to be 100% of the container. A handy illustration can be found at <!-- m --><a class="postlink" href="http://msdn.microsoft.com/workshop/Author/om/measuring.aspI've">http://msdn.microsoft.com/workshop/Auth ... ng.aspI've</a><!-- m --> tried setting the body with an "overflow: hidden", but it makes no odds..., no scrollbar, but still a gap at the right of the screen...

Or am I missing something else?Try adding<style>
body {overflow: hidden; margin: 0px}
</style>It works!

Hoorah for you! :-)

Thanks for the help :-)
 
Back
Top