Welcome to WebmasterWorld Guest from 23.20.18.183

Forum Moderators: not2easy

Message Too Old, No Replies

Stacked divs

renders text unselectable?

     
4:54 am on Feb 21, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Oct 9, 2002
posts:245
votes: 0


<div id="a"> has z-index:1, <div id="b"> has z-index:2 and transparent as background color. "b" has right text alignment and contains one image. Shouldn't text in "a", visible through "b", be selectable if there is nothing directly over in "b"? I've purposefully stacked a transparent .gif over divs before to achieve just that - was I wasting my time? Causing me pause before moving on to "C".
11:27 am on Feb 21, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Hi Edouard_H,

While there is nothing visibly over "a", from the browsers point of view there is something over div a, namely div b. While the background is transparent and you can see the contents of div a, div b (an object) is still sitting on top of div a.

Therefore, when your mouse is trying to select the text in div a, it is in fact just trying trying to select anything in the top most object, ie div b.

HTH

2:45 pm on Feb 21, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Oct 9, 2002
posts:245
votes: 0


Thanks BlobFisk. It all makes sense in the light of day.