runeer
February 10, 2015, 4:24am
1
Hi,
I’m creating this temporary webpage, the css works on FF & Chrome but not IE11.
My CSS codes:
#container {
height: 100%;
width: 100%;
}
#contents {
padding: 5%;
max-width: 980px;
min-width: 320px;
max-height: 540px;
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
}
IE11 will centralize “contents” only if I change max-width to width. Is there any ie hack I can apply to make this work on IE11 and older IEs?
EDITED by admin to include code tags.
ralphm
February 10, 2015, 5:01am
2
Could you put up a full demo that shows the problem at CodePen? That would make it easier to help, along with an indication of which version of IE you are working with.
runeer
February 10, 2015, 5:14am
3
I’ve uploaded it here: http://runeer.net/psp/ , I’m working with IE11
ermm… I don’t have a CodePen account yet
ralphm
February 10, 2015, 5:37am
4
Our resident guru @paulOB recently posted a very nice tutorial on how to deal with this: Centre absolute elements
system
Closed
May 12, 2015, 12:52pm
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.