문제

I have 2 pc's, both windows7. Both using IE11 (same build). To display a table in the center of the screen i use this div tag:

#centerblock
    {
    display: block;
    background-color: #F8F8F8; 
    border: 1px solid #000088; 
    width: 450px;
    margin-left: auto; 
    margin-right: auto;
    }

On one pc the block is in the center, on the other one the block is totally left aligned. In de used style attributes (F12) there is no difference.

On the failing-to-center pc, chrome has no problem with centering.

Is there an IE setting that prevents this div to work? Or has anyone this seen before (en found the solution)?

TIA Hans

도움이 되었습니까?

해결책

reading through your comment, you had mentioned one browser being in compatibility mode...use this meta tag which will force the brwser to open in a specific mode...in this case the latest IE environment available.

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

hope this helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top