I have encountered a peculiar issue with a webpage I created using ASP.net and normal HTML.
When viewing the page in IE10, all CSS properties work correctly. However, in IE8, the max-width property does not seem to function as expected.
An interesting observation is that when I include
<!DOCTYPE html>
before the <html>
tag, it resolves the issue in IE8. But without it, the problem persists.
In my ASP.net master page, I have included <!DOCTYPE html>
, but upon running the website, it gets removed, causing compatibility issues with IE8.
Why does ASP.net remove this declaration from the page?
With <!DOCTYPE html>
:
Without <!DOCTYPE html>
:
CSS for the tile box:
.tilebox {
color: white;
height: 60px;
line-height: 85px;
margin: 5px;
min-width: 180px;
padding: 15px;
text-align: center;
width: auto;
}
And for the parent div:
#boxcontainer {
height: auto;
margin: 0 auto;
max-width: 740px;
min-width: 200px;
padding: 0;
width: 100%;
}
The max-width property does not seem to take effect on the div with id #boxcontainer.