/    Sign up×
Community /Pin to ProfileBookmark

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.

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisApr 17.2003 — 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/Author/om/measuring.asp
Copy linkTweet thisAlerts:
@billybofhauthorApr 17.2003 — 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?
Copy linkTweet thisAlerts:
@gil_davisApr 17.2003 — Try adding&lt;style&gt;
body {overflow: hidden; margin: 0px}
&lt;/style&gt;
Copy linkTweet thisAlerts:
@billybofhauthorApr 17.2003 — It works!

Hoorah for you! :-)

Thanks for the help :-)
×

Success!

Help @billybofh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...