CSS not working in IE?

51,861

Solution 1

Your html is invalid in many ways. Please fix that first.

Solution 2

Add a DOCTYPE!

Either HTML5 or HTML4 Strict (not Transitional) are recommended for best cross-browser support.

<!DOCTYPE html>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


(As you can see, HTML5 is much simpler, and still usable even if you're not yet using HTML5 tags.)


Note: The DOCTYPE must be very first thing in the file, before all other tags, and with no blank lines, tabs, nor spaces before it.

Solution 3

You may want to try adding a doctype.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Edit: The doctype declaration should be the first thing in the html file. It goes even before the <html> tag.

Solution 4

The Quick Solution: Remove "overflow: auto;" from #wrapperbig and #wrapper.

This will get the content to be displayed.

However, be sure to look at the other answers. They have good points.

Solution 5

I too faced the same problem and found a solution after some research.

  1. Do not code CSS on the HTML file
  2. Make a separate CSfile and link to it using <link rel="stylesheet" href="css/style.css">
  3. And always add <!DOCTYPE> tag to every HTML page //*This is the main solution
Share:
51,861
Admin
Author by

Admin

Updated on March 14, 2020

Comments