S
S
Sergey750il2014-10-08 22:20:05
Drupal
Sergey750il, 2014-10-08 22:20:05

Why does the mobile version of the site load in IE8 on Bootstrap 3?

Hello. I ran into a problem that the mobile version of the layout in IE8 is loaded instead of the full version of the site. So far, everything is installed on Denver. The load conditions for respond.js and html5shiv.js are set, but the scripts don't work. I don't know which way to dig. Maybe I have some problems with the browser, but the conditions do not work although the files are loaded. I am using Bootstrap 3.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    
     <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
<link href="css/style.css" rel="stylesheet">
</head>
<body>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
</body>
</html>

<b>Также выкладываю код файла html.tpl.php тк сайт одеваю на Drupal 7.  Здесь тоже такая проблема с IE8 и не знаю как прописать путь для скриптов в Drupal. Обычно подключаю скрипты в файле .info, но там нет условия...</b>

<?php

/**
 * @file
 * Custom theme implementation to display the basic html structure of a single
 * Drupal page.
 */

?>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php print $head ?>
    <title><?php print $head_title ?></title>
    <?php print $styles ?>
    <?php print $scripts ?>
    <?php print $head_bottom ?>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
  </head>
  <body class="<?php print $classes ?>"<?php print $attributes ?>>
    <?php print $page_top ?>
    <?php print $page ?>
    <?php print $page_bottom ?>
  </body>
</html>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Aligatro, 2014-10-08
@Aligatro

Unfortunately, I didn't fully understand your question. Maybe the problem is in the condition itself (although at first glance, everything is fine), try making the condition specifically for IE 8 (if IE 8).

A
anikitin35, 2014-11-20
@anikitin35

Same problem on Drupal.
I read a lot about this. One possible solution:
stackoverflow.com/questions/12837568/css3-mediaque...
Try css3-mediaqueries
I'll wait for the results.

D
Dimonchik, 2016-11-01
@dimonchik2013

you choose the content and process it with the language
, you can also use it in the database, but it’s more complicated

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question