Jump to content

Columns taking full width in bootstrap in IE7 & 8


tejasamrute

Recommended Posts

The columns are showing full width in IE7 & 8 even though i have set to 'col-sm-4'.

 

i have used bootstrap files n respond.min.js locally inorder to eliminate probs caused by CDN links..

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="bootstrap.min.css">  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>    <script src="bootstrap.min.js"></script>        <!--[if lt IE 9]>      <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>      <script src="respond.min.js"></script>    <![endif]-->         <title>Untitled Document</title><style type="text/css">.container-fluid {	background-color:pink;}</style></head><body><div class="container-fluid">  <h1>Hello World!</h1>      <div class="row">        <div class="col-sm-4" style="background-color:lavender;">.col-sm-4</div>        <div class="col-sm-4" style="background-color:lavenderblush;">.col-sm-4</div>        <div class="col-sm-4" style="background-color:lavender;">.col-sm-4</div>    </div></div></body>
Link to comment
Share on other sites

<!DOCTYPE HTML><html lang="en"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="bootstrap.min.css">  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>    <script src="bootstrap.min.js"></script>     <!--[if lt IE 9]>      <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>      <script src="respond.min.js"></script>    <![endif]-->    <title>Untitled Document</title><style type="text/css">.container-fluid {	background-color:pink;}</style></head><body><div class="container-fluid">  <h1>Hello World!</h1>      <div class="row">        <div class="col-sm-4" style="background-color:lavender;">.col-sm-4</div>        <div class="col-sm-4" style="background-color:lavenderblush;">.col-sm-4</div>        <div class="col-sm-4" style="background-color:lavender;">.col-sm-4</div>      </div></div></body></html>
Link to comment
Share on other sites

I'm testing this in Internet Explorer 8 and it is working fine. Internet Explorer 7 puts the columns side by side as well, except that the third column doesn't fit so it's going below.

 

IE8 and under won't work right on the filesystem, but they work when the page is uploaded to localhost or another server.

Link to comment
Share on other sites

The newer version of Internet Explorer doesn't make a distinction between browser mode and document mode, you probably should change your browser mode to match the document mode when testing and be sure you're testing standards compliant document mode.

 

What's the URL of the page you're testing? Did you check the console for errors?

Link to comment
Share on other sites

Open the developer tools, change browser mode and document mode to IE8, then open the console tab of the developer tools and reload the page to check for any errors.

 

Make sure you're testing the page on a server, like localhost.

Link to comment
Share on other sites

I have noticed that if i choose browser mode 8 with document mode 8...it shows perfectly.....but it has to be done manually......is there any way to force this....e.g if a visitor has come from ie8.....his browser mode and document mode would be forced to ie8

post-175359-0-83401400-1420014358_thumb.jpg

post-175359-0-06480800-1420014360_thumb.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...