Avatar of mocaiv
mocaiv asked on

asp.net absolute position with higher z-index to break free of parent div possible???

<div style="background-color:green; height:300px; width:300px; overflow:auto;">
    <div style="height:400px; width:400px; position:absolute; z-index:500; background-color:yellow; top:500px;">
    </div>
</div>

if you look at this in html, you'll see that the inner div positions it self lower but its still inside the overflow and now has scroll bars..  is there anyway possible to use css to break free of this and have the absolute positioning actually be the positioning on the page and not the div?
ASP.NET

Avatar of undefined
Last Comment
mocaiv

8/22/2022 - Mon
Rejojohny

try addin the second div tag outside the main div
<div style="height:400px; width:400px; position:absolute; z-index:500; background-color:yellow; top:500px;">
    </div>
<div style="background-color:green; height:300px; width:300px; overflow:auto;">
</div>

but you will have make changes to the position of the child div as per your requirement ..

Rejo
Qaiser_Mehmood_Mughal

Dear simple set the Z-Index=9999 to the div to get it on working...
ASKER
mocaiv

neither solution is valid.   placing the div outside of the main div is not a possible scenario.  .. setting the z-index to a ridiculous value like 9999 is also not a valid solution
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Qaiser_Mehmood_Mughal

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Rejojohny

>>placing the div outside of the main div is not a possible scenario
can i ask why?
ASKER
mocaiv

because thats the resulting code.  in the design of this  the div with the overflow: auto
contains a user control which contains a a div that contains information that needs to "hover" over everything , even over the parent container, outside the overflow boundaries