/    Sign up×
Community /Pin to ProfileBookmark

Custom Background for Modal Div Does Not Fill Page

I have the following setup to create a modal div. In IE7 compatibility mode, the background DIV does not fill the entire page. It appears to only fill the page to the bottom of the content.

[code]
<div id=”DIV_MessageDetail” runat=”server” style=”position:absolute;display:none;width:100%;height:100%;top:0px;left:0px”>
<div style=”position:absolute;filter:alpha(opacity=66);background-color:red;height:100%;width:100%”>
</div>
<div style=”z-index:1000;position:absolute;background-color:#FFFFFF;margin:auto;top:100px;left:150px;border:solid 3px #000000″>
content
</div>
[/code]

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 20.2010 — The snippet needs another closing </div> somewhere to be able to see the problem.
Copy linkTweet thisAlerts:
@dch3authorSep 28.2010 — Here's the full markup

[Code]

<div id="DIV_MessageDetail" runat="server" style="position:absolute;display:none;width:100%;height:100%;top:0px;left:0px">
<div style="position:absolute;filter:alpha(opacity=66);background-color:Gray;height:100%;width:100%">
</div>

<div style="z-index:1000;position:absolute;background-color:#FFFFFF;margin:auto;top:100px;left:150px;border:solid 3px #000000">


</div>
</div>

[/code]
Copy linkTweet thisAlerts:
@slaughtersSep 28.2010 — Try changing DIV_MessageDetail from position:absolute to position:fixed
×

Success!

Help @dch3 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.18,
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,
)...