Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Stacked divs

renders text unselectable?



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

10+ Year Member

<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)

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

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.



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

10+ Year Member

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

Featured Threads

Hot Threads This Week

Hot Threads This Month