100% width div in IE5.5
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 http://msdn.microsoft.com/workshop/A.../measuring.asp
I've 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
Code:
<style>
body {overflow: hidden; margin: 0px}
</style>
It works!
Hoorah for you! :-)
Thanks for the help :-)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks