473,462 Members | 1,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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

Jul 20 '05 #1
6 37107
Marcus Otmarsen wrote:
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>
10 what? You need a unit with css, e.g., 10px.
Can two <div> panes on the same area co-exist?


Url?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
> 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.
Jul 20 '05 #3
> 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.
Jul 20 '05 #4
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.

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #5
On Thu, 05 Aug 2004 07:53:20 +0100, Mark Tranchant
<ma**@tranchant.plus.com> wrote:
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
Jul 20 '05 #6
On Thu, 5 Aug 2004 00:56:33 +0200, ot***@gmx.net (Marcus Otmarsen)
wrote:
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

Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Catherine Lynn Smith | last post by:
I am creating a webpage with dhtml <DIV> layers and I want a link on one layer to modify the content on another but I seem to keep running into errors. Basically I create a layer in the middle...
2
by: Marcus Otmarsen | last post by:
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...
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
14
by: Charlie T | last post by:
Hello, is there any way to get this to work? myID.innerHTML = "Hello" <DIV id="myID"></DIV> <DIV id="myID"></DIV>
4
by: Tim Sheets | last post by:
Hi all, I am having a problem that seems so simple, I am almost embarrassed to ask about it. I am working on a page that has the layout largely css driven. The top of the page has two <img>...
12
by: Kevin Blount | last post by:
I'm playing with dragable <DIV>s, being inspired by google.com/ig, where you can move items on the page around and have items you move over change position if necessary. I have 3 div's setup,...
4
by: Bruce W...1 | last post by:
IE 6 supports the DOM for the most part. Am I missing something or is this absent from Visual Studio 2003? Does Web Matrix have it? You see, I'm trying to get Visual Studio and Dreamweaver MX...
2
by: Sebastian Gohres | last post by:
Hi! I want three DIV-Container side by side in another DIV-Container: ____________________________________ |text text text text text text text | | __________ __________ __________ |...
1
by: gaya3 | last post by:
Hi All, In my dojo grid application, want to create <div> tag inside another <div> tag by using document.createElement('DIV'); I done as follows var outerNode =...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.