Answer the question
In order to leave comments, you need to log in
How to horizontally center a rubber block that has max-width?
Is it possible to do this without js and cross browser?
Current Block Styles
.popup {
background: #fff;
position: fixed;
width: 70%;
z-index: 99999999;
left: 15%;
top: 10%;
max-width: 900px;
}
Answer the question
In order to leave comments, you need to log in
.popup {
position: fixed;
width: 70%;
left: 0;
right: 0;
top: 10%;
max-width: 900px;
background: #000;
margin: 0 auto;
}
Like this: jsfiddle.net/IonDen/jrqaw5se
.popup {
position: fixed;
width: 70%;
left: 50%;
top: 10%;
max-width: 900px;
transform: translate(-50%, 0);
background: #000;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question