HTML CSS examples for CSS Widget:Panel
Centered popup on small screen
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .wrapper {<!--from w ww.java2s .c o m--> text-align:center; background:Chartreuse; border:2px solid yellow; position:fixed; top:0; bottom:0; right:0; left:0; } .centered { width:501px; padding:11px 16px; border:2px solid blue; background:pink; position:absolute; left:51%; top:51%; -ms-transform:translate(-51%, -51%); -webkit-transform:translate(-51%, -51%); transform:translate(-51%, -51%); } </style> </head> <body> <div class="wrapper"> <div class="centered"> <h1>Lorem ips</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, orn</p> </div> </div> </body> </html>