HighDots Forums  

Defining <DIV> on top of another <DIV> pane with transparency?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Defining <DIV> on top of another <DIV> pane with transparency? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marcus Otmarsen
 
Posts: n/a

Default Defining <DIV> on top of another <DIV> pane with transparency? - 08-04-2004 , 05:56 PM






Ok, the situation is as follows:

I defined a <DIV> like:

<div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div>

This pane is used to move an object around on the web page by a javascript.

As long as I define no further <div> pane everything works fine.

Then (due to other requirements) I introduced some other <div> panes similar to

<div style="position: absolute; top: 0; left: 0; width: 400px; height: 1000px;
background-image: url(image/mybackround.gif)"><img src="images/mypic.gif"></div>

From this moment on I cannot see the object defined in the first <div> statement any more.

Hmm, I guess that this is because the later <div> panes "overwrite" the first one.

Can two <div> panes on the same area co-exist?

Or can I drop one <div> pane on top of the other with transparency property?

Marcus


Reply With Quote
  #2  
Old   
cruiserweight
 
Posts: n/a

Default Re: Defining <DIV> on top of another <DIV> pane with transparency? - 08-05-2004 , 12:15 AM






Quote:
I defined a <DIV> like:

div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div

Then

div style="position: absolute; top: 0; left: 0; width: 400px; height: 1000px;
background-image: url(image/mybackround.gif)"><img src="images/mypic.gif"></div
try giving the secondary div an id, too. otherewise it becomes
impossible to tell them apart. absolutley positioned divs can overlap,
define background-color:tranparency to acheived the desired affect.


Reply With Quote
  #3  
Old   
cruiserweight
 
Posts: n/a

Default Re: Defining <DIV> on top of another <DIV> pane with transparency? - 08-05-2004 , 01:02 AM



Quote:
I defined a <DIV> like:

div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div

Then

div style="position: absolute; top: 0; left: 0; width: 400px; height: 1000px;
background-image: url(image/mybackround.gif)"><img src="images/mypic.gif"></div
try giving the secondary div an id, too. otherewise it becomes
impossible to tell them apart. absolutley positioned divs can overlap,
define background-color:tranparency to acheived the desired affect.


Reply With Quote
  #4  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: Defining <DIV> on top of another <DIV> pane with transparency? - 08-05-2004 , 01:53 AM



Marcus Otmarsen wrote:

Quote:
Can two <div> panes on the same area co-exist?

Or can I drop one <div> pane on top of the other with transparency property?
Easily. Read up on absolute positioning and z-index.

Transparency isn't widely supported (ie IE). Take a look at my site
(sig) in Firefox and find a page that needs vertical scrolling - then
watch the header bar as you scroll.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #5  
Old   
Claire Tucker
 
Posts: n/a

Default Re: Defining <DIV> on top of another <DIV> pane with transparency? - 08-05-2004 , 09:55 AM



On Thu, 05 Aug 2004 07:53:20 +0100, Mark Tranchant
<mark (AT) tranchant (DOT) plus.com> wrote:

Quote:
Marcus Otmarsen wrote:

Can two <div> panes on the same area co-exist?

Or can I drop one <div> pane on top of the other with transparency property?

Easily. Read up on absolute positioning and z-index.

Transparency isn't widely supported (ie IE). Take a look at my site
(sig) in Firefox and find a page that needs vertical scrolling - then
watch the header bar as you scroll.
Is the JavaScript alert() message "Handler could not be removed" on
every newly-loaded page intentional?

-Claire


Reply With Quote
  #6  
Old   
Harag
 
Posts: n/a

Default Re: Defining <DIV> on top of another <DIV> pane with transparency? - 08-05-2004 , 12:43 PM



On Thu, 5 Aug 2004 00:56:33 +0200, ottiC (AT) gmx (DOT) net (Marcus Otmarsen)
wrote:

Quote:
Ok, the situation is as follows:

I defined a <DIV> like:

div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div

This pane is used to move an object around on the web page by a javascript.

As long as I define no further <div> pane everything works fine.

Then (due to other requirements) I introduced some other <div> panes similar to

div style="position: absolute; top: 0; left: 0; width: 400px; height: 1000px;
background-image: url(image/mybackround.gif)"><img src="images/mypic.gif"></div

From this moment on I cannot see the object defined in the first <div> statement any more.

Hmm, I guess that this is because the later <div> panes "overwrite" the first one.

Can two <div> panes on the same area co-exist?

Or can I drop one <div> pane on top of the other with transparency property?

Marcus

Check out the z-index property under CSS.

the higher the z-index the more priority it has over other things.

for your large div assign a value of 1 and for the div to appear ontop
of that assign a value of 2

HTH

Al



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.