Search code examples
csshtmloverlap

How to control `div` overlapping in html


I am creating a webpage, And I have two divs, 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. :)


Solution

  • use z-index value to adjust them accordingly to layer. its a style property: style="z-index:200"....