I have a website and I would like to put a DIV above this website with field to enter e-mail and button “Subscribe”. It should work like this advertisements that we all like. So this div should be always on the center of the screen, and it should be “above” the website and scroll while user is browsing though the page. When user clicks X it should close.
How to do this?
See the CSS
position:fixedandz-indexproperties. To center the item horizontally and vertically, give it fixed dimensions, position it at 50%,50%, and then use negative margins. For example:To ‘close’ it, set the
displaytononevia JS. For example: