The issue of CSS percentages not functioning properly in Internet Explorer 9 while working seamlessly in all other browsers

Currently, I am creating a unique theme with inline CSS for my first website located at .

I have conducted testing on various browsers such as Firefox, Opera, and Chrome, only to discover that most of the CSS is not displaying correctly in the latest version of Internet Explorer.

This theme is designed to be responsive (you can try resizing the window to mimic mobile display). To achieve this, I have utilized percentage values instead of absolutes, along with implementing a media query.

However, it seems like there might be something crucial missing. Can anyone point out what it could be?

In the screenshot provided above, some issues observed include:

  1. Lists are not displayed inline and take up 100% of the line (display: inline).
  2. The margin in the sidebar appears too large (margin-bottom: 10%).
  3. The background does not display behind text (background: #f2f2f2).
  4. The text for dates does not switch to uppercase (text-transform: uppercase).
  5. Images do not resize accordingly.

All CSS rules are embedded inline except for an external style sheet serving as a CSS reset.

Answer №1

The presence of a comment above the doctype declaration is triggering Quirks Mode in IE:

<!-- 
Theme: Pliancy
-->
<!DOCTYPE html>

To resolve the issue, simply remove the comment.

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

Create a distinct CSS animation 'origin' declaration for every <g> element

I am using CSS animation to apply a 'wobble' effect to each letter within a word. The letters are represented by SVG groups <g>. However, in the provided example, the wobbling effect becomes more pronounced with each subsequent letter, wher ...

What causes the select field value to be combined with the values of other fields in the form?

When I select a value from the dropdown menu, the selected value is being added to the other fields as well. Here is the code snippet that was causing the issue: import React, { Component } from 'react'; import './C.css'; import {But ...

Responsive and neatly arranged navigation links using Bootstrap 4

Currently undergoing the process of transitioning from Bootstrap 3.3 to 4.1, I find myself faced with two final complications. In Bootstrap 3.3, I had a responsive navbar without branding, where the links were evenly spaced. While I have managed to get my ...

Use an if statement in Angular to conditionally add a title attribute with an empty value to HTML

How can I conditionally add the title attribute to a div without creating another div and using ngIf? If the permission is true, I want to include a title in my div. Here's what my current div looks like: <div (click)="goToChangelog()&quo ...

Align the number of an Unordered List to the left

Exploring UN-ordered lists in HTML has led me to wonder if it's possible for dynamically generated ul tags to display like this: * Hello * Hi * Bi * Name * Ron * Mat * Cloth * Color * Red When I ...

How to Align Printed Output in Angular Components

I am a beginner in Angular and I am looking to display modal information. To print the data, I am using onclick=print(). The data shows up in the print preview, but it is not aligned correctly. Here is a screenshot of my page. I want to align the data prop ...

Aligning images of varying sizes

I have implemented a PHP script that automatically resizes images proportionally to fit within a given height and width. For example, if the original picture is 200x100px and the target box is 180x180px, the resized image will be 180x90px. Although this s ...

I'm having trouble getting CSS to apply to my HTML file. Any idea why?

I conducted tests in both Chrome and Firefox, ruling out any browser-related issues. My CSS has been validated and is error-free. However, when I validate my HTML code, an error message pops up stating "Bad value “stylesheet” for attribute rel on eleme ...

Issues with Bootstrap column rendering in IE11's Flex layout

I need assistance with the code below: .hero{ background:lightgrey; padding: 50px 0px; } <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E26 ...

Include a carrot icon on a navigation element that is currently active, ensuring it does not disrupt the position of the navigation icon within the container

I am working on a react navigation bar where I want to emphasize each navigation item with a carat when the user is on a specific URL or route. I have been trying to use the :after pseudo-class in Sass to add the carat, but it's not working as expecte ...

Creating a responsive layout with organized rows and columns using Bootstrap

I'm currently facing some challenges with the arrangement of columns and rows in a bootstrap layout. I'm unsure if it's feasible to achieve what I have in mind using Bootstrap's grid system. Here is the layout I have for larger devices ...

Continuously update the content within a paragraph using jQuery

After searching for a jQuery animation that would constantly change text within a paragraph, I stumbled upon a solution at this link : Text changing with animation jquery. However, I encountered a challenge as I wanted to include a bootstrap button beneath ...

Modifying element size using jQuery causes issues with maintaining a 100% height

I am facing an issue with a sidebar that is styled using the following css properties: background:#164272; position:absolute; left:0px; top:70px; width:250px; height:100%; When I use jQuery to display a table that is initially hidden and on ...

The advice I received was to avoid using max-width and instead utilize min-width when styling with CSS

With @media screen and (max-width:700px) { Link to image 1 Whenever I use @media screen and (min-width: 700px) { it messes up. How can I adjust it for min-width without causing issues? Link to image 2 ...

JavaScript Application - Problem with Universal Windows Script

I recently built a website utilizing material design lite for the aesthetics: Here are the scripts included: <script src="./mdl/material.min.js"></script> <script src="Scripts/angular.min.js"></script> The necessary .css fi ...

Remove the right margin on the bootstrap container

I am currently working on creating dashboards using the Python library called Dash, and I have encountered an issue with Bootstrap components. Specifically, I am unable to remove the right margin from the container. I have tried using class_name='m-0& ...

Add a <div> element to a webpage in a random location every time the page is refreshed

I have a variety of 2 types of <div>s displayed on a single page. Collection 1 consists of: <div class="feature">content 1</div> <div class="feature">content 2</div> ...and so forth. Collection 2 consists of: <div class ...

Is there a way to make a DIV's span equal in height to its inner H3

I am working with a layout that looks like this ... <div style="width: 99%; border: 1px dotted #0683DA; padding: 8px;"> <h3>Some Header</h3> <div class="d-dataGridBodyRow" style="padding: 0px"> <table style="vert ...

Modify the css with JQUERY when there are no rows inside the tbody section

Is it possible to change the css using jquery if there are no rows in the table body? I have attempted this but my current approach is not working. I tried adding an alert within the if statement, but the alert did not appear. My goal is to hide the table ...

How can I resize my image to fit the parent div while preserving its aspect ratio?

My image is dynamic, switching between portrait and landscape orientations. I want it to fill its parent div 100% while maintaining its aspect ratio. I've seen similar questions asked, but I have some specific requirements: Avoid using background c ...