Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top