/    Sign up×
Community /Pin to ProfileBookmark

External DIV transparency

Hi all guys,
I have a page with a login that “pops up” in a div element (changing from display:none to display:block).

The external part of this popup is at present normal (no effects).
I would like to partially hide the contents [U]outside[/U] this div with a black background with a transparency set to 50%.
Could you please help me ?

There’s the div:

[CODE]<div id=”div_login_menu”>
Login Form with input fields and submit button.
</div>[/CODE]

There’s the JS:

[CODE]function hideLogin(){
document.getElementById(“div_login_menu”).style.display= ‘none’;
}

function showLogin(){
document.getElementById(“div_login_menu”).style.display= ‘block’;
}[/CODE]

and the CSS:

[CODE]#div_login_menu {
position:absolute;
background-color:#FFFFFF;
left:50%;
top:340px;
width:340px;
text-align:center;
z-index:1;
margin-left:-170px;
display:none;
}[/CODE]

Thank you in advance…
Kess

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@kierhonFeb 14.2008 — Are you looking for something with this effect http://www.huddletogether.com/projects/lightbox/
Copy linkTweet thisAlerts:
@KessauthorFeb 14.2008 — Yepp thx, that's exactly what I need but the contents aren't images but just a simple submit form.

How should I modify my code ?

Again thank you for your quick answer
Copy linkTweet thisAlerts:
@kierhonFeb 14.2008 — Well if you download the zip you can see how they link and what the include. You'll need to tie in the form actions to Ajax Response Object (unless you know a programmer that could take care of that). The only thing you'll need to include on any forms is the class="lbAction" rel="deactivate"[/QUOTE] on any buttons. The stylesheet they include is pretty straight forward and will let you adjust the color of the transparency layer, the amount of transparency, size and positioning of the content, etc.
Copy linkTweet thisAlerts:
@KessauthorFeb 14.2008 — Ok, I'll try to do that... I'm not a JS coder but I'll try to figure out how to do that.

Thank you again :-)
×

Success!

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