The styling of section and small elements appears differently in Internet Explorer compared to Chrome

I am working on an HTML code to showcase a list of individuals, including their names and statuses.

<section class="box-time">
    <ul class="group">
        <li>
            <a class="fancybox fancybox.ajax" href="../loadFancybox.php">
                <span class="info">
                    <strong>Name</strong>
                    <small>
                        <p id="pStatus" class="colorRed">Pending</p>
                    </small>
                </span>
            </a>
        </li>
    </ul>
</section>

Below is the CSS styling I have applied:

ul.group li {
    border: 1px transparent solid;
    float: left;        
    min-width: 232px;   
}

section.box-time li:hover{

    background-color:#9495A8
}

section.box-time li a{
    margin:0 10px;
    padding:15px 10px;
    display:inline-block;
    *display:inline;
    *zoom:1;
    color:#444;

}
section.box-time span.info{
    display:inline-block;
    *display:inline;
    *zoom:1;
    margin-left:5px;
    width:185px;
    max-height:45px;
    vertical-align:middle;
    white-space:normal
}

section.box-time span.info small {

    font:11px/1em Arial,sans-serif;
    font-weight: bolder;
    margin-top: 5px;
}

section.box-time span.info small p.colorRed{
    color:red;
}

section.box-time span.info small p.colorBlue{
    color:blue;
}

section.box-time span.info small p.colorGreen{
    color:green;
}

The issue arises when viewing in IE, where it looks different compared to Chrome.

Here is how the content appears in Chrome:

And this is how it displays in IE:

A live demo can be seen here: https://jsfiddle.net/083krhau/

What changes should I make to ensure consistent display across both browsers?

Answer №1

If you are encountering issues with an older version of IE, it may be due to lack of HTML5 support. To address this, consider adding the following code snippet to the head section of your website:

<!--[if lt IE 9]>
    <script>
        document.createElement('header');
        document.createElement('nav');
        document.createElement('section');
        document.createElement('article');
        document.createElement('aside');
        document.createElement('footer');
    </script>
<![endif]-->

By including this script, you can ensure that these tags are recognized as valid HTML elements. Remember to remove any unused tags for a cleaner code.

Alternatively, you can replace the problematic <section> tag with a <div> element as another workaround solution.

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

What could be the reason for the Javascript function failing to run?

I need assistance in executing a function called "send()" which includes an AJAX request. This function is located in ajax.js (included in the code snippet) The Ajax success updates the src attribute of my image. The function seems to be working correctly ...

What is the best way to implement grid-gap in the display:grid property?

I've added grid-gap to both classes, but the gap area is showing up in a different color than white. Additionally, the text is aligned at the top of each cell. How can I fix this? 1) Even though I applied grid-gap to both classes, the gap area is vi ...

Prevent navigation away from textarea using tab key

In my React editor project, I am trying to prevent the tab button from switching to the next field when used within a textarea. I have attempted various solutions, such as: <textarea className={style.textarea} required tabIndex="-1" ...

What is the best way to insert an anchor tag into text using React?

I am working with a variable const linkElement = `Hey this is a link ${<a href="www.google.com">Click me!</a>} that can be clicked}` Currently, it displays as Hey this is a link [Object object] that can be clicked. Is there a way to ...

Tips for implementing SelectedRowStyle in gridview with a bootstrap layout

I'm having trouble applying the SelectedRowStyle to a gridview in my application. The application uses a bootstrap template and the table css I applied is table table-striped. Does anyone know how to apply style for the selected row? ...

Unable to access due to permissions being denied on jQuery.form.js in Internet Explorer

What is the solution to this issue? I am encountering an access denied error in Internet Explorer on the file jquery.form.js. => if (io.contentWindow.document.execCommand) { try { // #214 io.contentWindow.document.execCommand( ...

Options chosen will vanish in a multi-select drop-down tag with a scroll bar in HTML

I need assistance with my multiple drop-down select tag issue. .CustomStyle { overflow-x: scroll; width: 16%; } <select multiple size="5" class="CustomStyle"> <option>Option 1</option> <option>Option 2</option> &l ...

how to combine a string in JavaScript using a prefix and suffix

Anion Gap Body Surface Area (BSA) Creatinine Clearance Stack Overflow i want to add "String" Before Text and "String" after end of text. I have Following expression which runs perfectly in excel:- =CONCATENATE("",B1,"") Output:- <string>Anion Ga ...

Is it better to choose AJAX and JQuery for their speed and complexity, or stick with the simplicity of GET requests?

When a user attempts to log in and fails, an error message should be displayed on the page. There are two primary methods that can be used to achieve this: one involves using a form action on the HTML page and handling incorrect login information in the PH ...

The clearCookie function is not functioning as intended when using specified options

Here is the code snippet for setting a session cookie: res.cookie(newCookieName, sessionCookie, { domain: getCookiesDomain(), maxAge: ms('30 days'), ...

An element featuring a background color is vertically aligned in the middle of its parent container

Struggling to achieve a seemingly simple task, but coming up short on finding a solution. The goal is to have a background-color that aligns vertically in the middle of the first and last images in a stack of images. It may sound more complicated than it a ...

Decrease in internal width

Seeking assistance to adjust the internal border width for better text alignment. I've been struggling with this issue as a beginner in the web development field and would appreciate some guidance. Link to image Here is a snippet of my HTML code: & ...

Tips for achieving the perfect spacing between inline-block elements

A sample scenario: https://i.sstatic.net/gmyS0.png Is it feasible to maintain consistent spacing between inline div elements? The challenge lies in the fact that auto width does not seem to be effective in achieving this. Here is the progress I have made ...

Validation of HTML forms through JavaScript

I'm working on form validation and struggling with implementing preg_match check from a variable. Currently, I can validate empty fields successfully, but that's not sufficient. Any suggestions on how to proceed? var pattern = /([a-zA-Z0-9]|[a-z ...

Is there a way to expand my image width-wise without affecting its height upon hover?

.film{ text-align: center; width: 234px; min-height: 311px; position: relative; z-index: 1; overflow: hidden; } .poster{ width: 234px; height: 311px; -moz-transition: all 1s ease-out; -o-transition: all 1s ease-out; ...

Tips for avoiding cursor sticking in css rotate transform in firefox?

I have a unique challenge in this code where I want the user to grab the black square and rotate it around the inner circle. Check out the code snippet here. While attempting to rotate the square, you might notice that the cursor sometimes gets stuck in ...

Is there a way to maintain scroll position on a dynamically refreshing div?

After searching for hours, I still can't find a solution to my problem. I am using a simple JQuery script to refresh a div and display my PHP output in it. $script = " <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery ...

Only one specific SVG tag is affected by the CSS stylesheet

I'm encountering an issue with my web page that has multiple SVG tags. Each SVG tag includes a block of style tags containing CSS styles for the respective SVG element. The problem is that these styles seem to leak into the overall global styles. For ...

WebDriverException thrown when attempting to forward new session; Docker encountered empty VM pool during setup causing Capabilities error

During the acceptance tests, I am encountering errors in my system that are not present in other team systems. The selenium webdriver inside my docker container was functioning correctly on both my PC and other systems, but for some reason, it has started ...

Leveraging the back button in an AngularJS Mobile SPA

Utilizing AngularJS for my Single Page App (SPA), I am currently exploring the most effective way to handle the back button functionality on mobile devices. My setup involves a single JavaScript file, one HTML page, and no partials. The content is reveale ...