Experiencing problems with web page layout when using bootstrap on IE8?

Here is a code snippet that functions correctly in IE9 and later versions, but encounters issues in IE8:

<div class="col-lg-5 col-md-5 col-sm-6 col-xs-6" id="div1"> 
                        <div class="panel panel-default" style="" id="panel1">
                            <div class="panel-body" style="" id="panelbody1">
                                <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                    <img src="img/Data Input.png" class="img-responsive" style="float:right;"/>
                                 </div>
                                 <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9" style="">
                                     <button type="button" class="btn btn-default btn-xl1">Data Input Interface</button>
                                  </div>  
                            </div>      
                            <div class="panel-body" style="" id="panelbody2">
                                <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                    <img src="img/Dashboard.png" class="img-responsive" style="float:right;"/>
                                 </div>
                                 <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                     <button type="button" class="btn btn-default btn-xl2">Dashboard</button>
                                  </div>  
                            </div>      
                      </div>   


<!--CSS File -->

<style>
@media(min-width:1500px){


.btn-xl1 {
       padding:40px;
        font-size: 25px;
        border-radius: 8px;
        margin-left:20px;
         color:green;
        background-color:lightgrey;
        width:100%;

      }

      .btn-xl2 {

          padding: 40px;
        font-size: 25px;
        border-radius: 8px;
        margin-left:20px;
       color:green;
        background-color:lightgrey;
        width:100%;
      }

    .btn-xl1 img{width:60px;}
    .btn-xl2 img{width:60px;}      
#panel1{width:70%;}
#panelbody1{border:1px lightgrey solid; border-radius:10px;}
#panelbody2{border:1px solid lightgrey;  border-radius:10px; margin-top:10px;}
#panelbody1 img{padding-top:10px;}
#panelbody2 img{padding-top:30px;}

}
</style>
<link href="css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>


      <script type="text/javascript" src="js/respond.min.js"></script>
      <script type="text/javascript" src="js/html5shiv.min.js"></script>

In using IE8, I encountered issues with button alignment, CSS formatting, and background color not displaying properly despite all necessary files being included. What could be causing this problem?

Answer №1

  1. Make sure to include the

    <script type="text/javascript" src="js/respond.min.js"></script>
    after all the body content on your page.

  2. If you are using IE8 or an older version, it is important to run your HTML script from a server to avoid security errors caused by respond.js / respond.min.js. If you don't have access to a server, you can debug via localhost to resolve this issue.

For more details, please visit this link

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Run JavaScript code before finalizing the "submit" action within a Ruby on Rails application

Having trouble with utilizing old JS scripts found on Stack Overflow. <div class="form-actions"> <%= f.button :submit, class:"btn btn-success create-campaign" %> </div> The submit button is causing an issue for me. <div clas ...

JavaScript: Working with Nested Callbacks and Retrieving MySQL Data

As I dive into the world of JavaScript server-side code, I find myself grappling with a common issue that many programmers face. In my previous experience with MySQL select queries in PHP, I would simply grab a result and loop through each row, performing ...

Implementing a custom loader screen in jQuery Mobile instead of displaying an error page while loading

I am in the process of developing a hybrid mobile application using Intel XDK and jQuery Mobile for the user interface. One challenge I encountered is related to an ajax form submission, which involves two logins and the use of tabs (2). Initially, I focus ...

Resizing images using a dynamic frame size

I am in need of some assistance as I am currently facing a roadblock. My goal is to develop a picture framing tool for photos where users can specify the size of their photo, choose a colored cardboard mount, and select a frame type. My client has requeste ...

Having issues with the alignment on Bootstrap 4, any suggestions on how to fix it?

I'm struggling with the layout of a web page using Bootstrap 4, and for some reason, I can't figure out why it's not displaying correctly. I've been staring at my code for about 15 minutes now, but I just can't seem to identify the ...

Focus on a particular div in order to enable scrolling beyond its boundaries

Whenever I move my mouse over the div tag, I am able to scroll the content. However, if I move the mouse outside of the div box, scrolling stops. Is there a way to make the specific div element track the mouse pointer no matter where it goes? <div st ...

What is the process for retaining data in mongoose without generating a new database object?

Whenever I try to save data using a bot command, a new object is created every time the data is submitted. I want to ensure that only one object is created, but every time the same user submits data, it should automatically update rather than create a new ...

Looking for assistance in determining a solution for progress bar implementation

Currently, I am developing a simple application using web technologies like HTML, CSS, and jQuery Mobile. This app enables me to create goals and save them to a listview using the <li> element. Every <li> representing a goal will have an assoc ...

What is the best way to transfer Javascript variables from an HTML template to a view function in Django?

Currently, I am developing a website using Django. One of the features I'm working on is a form in my HTML page that includes a textbox for users to input their name with a label "Enter your name". Underneath the textbox, there is a submit button. ...

How can you assign a div ID to an image with a backlink included?

I need assistance in centering an image with a back link inside a div id, positioned 850px to the left. Additionally, I require another Div Id containing text centered on the same line within that same 850px space. Below is my CSS: #container3 > div { ...

When I try to hover my mouse over the element for the first time, the style.cursor of 'hand' is not functioning as expected

Just delving into the world of programming, I recently attempted to change the cursor style to hand during the onmouseover event. Oddly enough, upon the initial page load, the border style changed as intended but the cursor style remained unaffected. It wa ...

Modifying the attribute from "content-disposition:attachment" to "content-disposition:inline"

I created an HTML email signature that worked perfectly until I tested it in the Outlook Mail Client 2010, which is currently not displaying images but instead offering them as download attachments. I am utilizing DataUri for images: <img width="56" ...

JavaScript Website Struggling to Make Postman REST API Call to Parse Server

I have set up a Parse API Server on Azure and can successfully make REST API calls to it using Postman. However, when I try to replicate this process in my web app using the jQuery AJAX code snippet generated by Postman, I encounter a 400 (bad request) err ...

Guide on receiving application/csp-report as json in an express application utilizing bodyParser

I am currently working on creating a middleware that can receive CSP reports from browsers. Browsers send these reports with the Content-Type of application/csp-report, and the data is in JSON format. Right now, I'm using bodyParser.text to handle thi ...

Removing the arrow icon preceding an image in a new line when dealing with dynamic data

My Angular project renders dynamic content that includes the following HTML structure: <div class="complted" *ngFor="let step of letStep1to7; let i = index; let first = first"> <table> <td class="steps" ...

Decoding the Blueprint of Easel in JavaScript

Recently, I came across a fantastic API that promises to simplify working with CANVAS by allowing easy selection and modification of individual elements within the canvas. This API is known as EaselJS, and you can find the documentation here. While I foun ...

Incorporate a PHP GET parameter through an onclick event to redirect using window.location in JavaScript when a button is

I am trying to modify the onclick event of buttons that look like this: <button class="buttons" onclick="window.location='page_test.php?VAR=1&VAR2=2'">BUTTON 1</button> <button class="buttons" onclick="window.location='p ...

Creating objects based on interfaces

After looking at this straightforward code: interface int1 { aa: string, bb: number, } const obj1:int1 = {} //#1 function fun(param_obj:int1) { //#2 } I am curious as to why the compiler throws an error: Type '{}' is missing the fol ...

Every time I attempt to submit data, I encounter a 404 error with AXIOS

Struggling to figure out why I keep encountering an error when trying to send form data from my website to the database using axios? Despite attempting various solutions, the problem persists. Although I can successfully retrieve manually entered data from ...

Navigating through PWAs and implementing deep linking in both single page applications (SPAs) and multi-page applications

QUESTION: How can navigation, history, and deep-linking be managed in a PWA without relying on a heavy JS Framework? Tasked with transitioning an existing shopping website from Angular 1 SPA to a Multi Page App (MPA) PWA, I find myself grappling with desi ...