I am creating a webpage, And I have two div
s, A and B for instance.
A's position is fixed
and it's on top of the page, but B's position is absolute
and is somewhere in the middle of the page. When they Overlap, B comes on top of A, But I want this to be the other way around. I want A to come on top of anything, but I don't know how to do that.
Please note that changing their positioning is not an option.
Thank You in advance. :)
You can use z-index
css setting to modifiy non-static positioned element order:
div#A { z-index: 2; }
div#B { z-index: 1; }
A will be displayed over B.
use z-index value to adjust them accordingly to layer. its a style property: style="z-index:200"....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With