- Mar 22, 2013
- 9,143
- 10,489
I put up a popup box on a website, and I managed to center it on my browser, however on mobile the box is all the way to the right. Basically, it's not cross-device compatible.
I can do a bit of CSS, but I'm no expert.
Here is the CSS used for the popup box:
I center the box using the "top" and "left" commands, but no luck in making it centered for mobile too.
Can anyone help me out?
I can do a bit of CSS, but I'm no expert.
Here is the CSS used for the popup box:
Code:
#ac-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, .6);
z-index: 1000;
}
#popup {
width: 555px;
height: 375px;
background: #FFFFFF;
border: 5px solid #000;
border-radius: 25px;
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
box-shadow: #64686e 0px 0px 3px 3px;
-moz-box-shadow: #64686e 0px 0px 3px 3px;
-webkit-box-shadow: #64686e 0px 0px 3px 3px;
position: relative;
top: 150px;
left: 550px;
}
I center the box using the "top" and "left" commands, but no luck in making it centered for mobile too.
Can anyone help me out?