position a div on top of an image

后端 未结 4 1047
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 05:50

I want position a DIV with the content of an addsense script on top of a img that I use as a banner.

I have the img tag inside a div. then I put the google script inside

4条回答
  •  广开言路
    2021-02-04 06:16

    You need to use position: absolute; and the parent must be position: relative. Without a proper position rule set z-index means squat.

提交回复
热议问题