PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Re: Opaque DIV tags refusing to be Opaque
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: Opaque DIV tags refusing to be Opaque

Réponse
 
LinkBack Outils de la discussion
Vieux 28/02/2008, 16h31   #1
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Opaque DIV tags refusing to be Opaque

On Feb 28, 10:52 am, "Rik Wasmus" <luiheidsgoe...@hotmail.com>
> Yes: absolute positioning, 2 containers (opaque element & container for
> pop-in box), don't make the one with the pop-in box a descendant but
> rather a sibling with both an apropriate z-index.


Rik;

I'm a noob still learning this stuff so I am not sure I understand
what you wrote.

Do you mean use 2 container divs, one containing the transparent
underlay and one containing the message box, with the message box &
underlay having the same z-index?

It seems that if I have two divs, one under the other, that the top
will become the parent. Can I neutralize that by setting the zindex
in each to be the same?




  Réponse avec citation
Vieux 28/02/2008, 16h54   #2
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Opaque DIV tags refusing to be Opaque

Rik;

Thinking about how to understand your comments made me stumble across
what the problem was:

<div id = "underlay" />

<div id = "messageBox">
blah blah blah
</div>

I thought <div/> was the same as <div></div> with the "underlay"
div. However, the first style was making the "underlay" div a parent
to the messageBox div. I switched to the second style of closing a
div and the problem cleared up.

Thanks


  Réponse avec citation
Vieux 28/02/2008, 17h24   #3
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Opaque DIV tags refusing to be Opaque

On 2008-02-28, Steve <tinker123@gmail.com> wrote:
> On Feb 28, 10:52 am, "Rik Wasmus" <luiheidsgoe...@hotmail.com>
>> Yes: absolute positioning, 2 containers (opaque element & container for
>> pop-in box), don't make the one with the pop-in box a descendant but
>> rather a sibling with both an apropriate z-index.

>
> Rik;
>
> I'm a noob still learning this stuff so I am not sure I understand
> what you wrote.
>
> Do you mean use 2 container divs, one containing the transparent
> underlay and one containing the message box, with the message box &
> underlay having the same z-index?
>
> It seems that if I have two divs, one under the other, that the top
> will become the parent. Can I neutralize that by setting the zindex
> in each to be the same?


You may not need to use z-index.

I posted an example of one way to do it earlier. But however you do do
it, the bottom line is to remember that you can never make an element
more opaque than its ancestors.

You could achieve the same effect using pngs with alpha of course--
those are just alphas, not recursive opacities. That might be easier.
Just make a 1x1 pixel semi-opaque png, tile that as the background image
on your overlay that's supposed to grey things out, and then put the
popin on top. Don't set opacity on anything.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h03.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09120 seconds with 11 queries