I am attempting to achieve a consistent appearance across all web browser styles

Here is the issue I am facing:

I am currently working on a website and encountering difficulty in achieving uniform appearance across different internet browsers. Below you will find my posted stylesheet.

My attempt to utilize css.reset is posing a challenge as I am not completely understanding its functionality. The problem arises when viewing the website in Chrome versus Internet Explorer. In Chrome, the styling renders the website as desired; however, in Internet Explorer, there is a misalignment of pixels by approximately 200 pixels in an opposite direction. I am also looking to provide a comparison screenshot displaying how the site appears in Explorer.

html, body, div, span, applet, object, iframe,
h2, h3, h4, h5, h6, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, center,
dl, dt, dd, ol, ul,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}

footer, header, hgroup, menu, nav, section {
display: block;
}

html {
height: 100%;
width: 100%;
}

h1 {
text-align: center;
color: white
}


h3 {
text-align: center;
color: white;
}

@media only screen and (min-width:960px){
/* styles for browsers larger than 960px; */
.center{
margin-left: auto;
margin-right: auto;
top: 125px;
right: 420px;
margin-bottom: auto;
margin-top: auto;
width: 700px;
height: 400px;
position: fixed;
}
}
@media only screen and (min-width:1440px){
/* styles for browsers larger than 1440px; */

}
@media only screen and (min-width:2000px){
/* for sumo sized (mac) screens */
}
@media only screen and (max-device-width:480px){
   /* styles for mobile browsers smaller than 480px; (iPhone) */
   .center{
margin-left: auto;
margin-right: auto;
top: 150px;
right: 130px;
margin-bottom: auto;
margin-top: auto;
width: auto;
height: 350px;
position: fixed
}
}
@media only screen and (device-width:768px){
   /* default iPad screens */
}
/* different techniques for iPad screening */
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
  /* For portrait layouts only */
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
  /* For landscape layouts only */
}



/*must aways have a position
VIDEO SECTION
*/



@media only screen and (min-width:960px){
/* styles for browsers larger than 960px; */
video{
width: 1000px;
height: 500px;
position: absolute;
left: 200px;
top: 150px;
}
}

@media only screen and (max-device-width:480px){
   /* styles for mobile browsers smaller than 480px; (iPhone) */
video{
width: 600px;
height: 500px;
position: absolute;
left: 70px;
bottom: 500px;
}
}



h4 {
text-align: center;
color: white
}
h2 {
text-align: center;
color: white
}

h5 {
text-align: center;
color: white
}


p{
position: relative;
text-align: center;
top: 400px;
}




body {
/*This is the pages background color*/
background-color: #000080;
background-repeat: no-repeat;
background-size: cover;
color:white;
font-family: Arial, Helvetica, sans-serif;
}

.tab {
list-style-type: none;
margin: 0;
padding: 0;
overflow: auto;
/* tab color*/
background-color: #cccccc;
opacity: 1;
}

.boarder {
float: left;
border: 2px groove black;
}

ol {
word-break: break-all;
    display: block;
    list-style-type: decimal;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
/*This works like an margin in word where it the words 
a few inches from the border*/
    padding-left: 30px;
}

ol li {
    padding: 10px;
    margin-left: 35px;
}

.boarder_2{
border: 5px groove black;
border-style: solid;
margin: 0;
opacity: 1;
border-color: #5791ed; 
padding: 5px;
}


li a {
display: block;
color: white;
text-align: center;
padding: 8px 10px;
text-decoration: none;

}

li a:hover:not(.active) {
background-color: #111;
}

.active {
background-color: #4CAF50;
}

.none {
float: none;
}

li {
float: left;
}

li a, .dropbtn {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

li a:hover, .dropdown:hover .dropbtn {
    background-color: red;
}

li.dropdown {
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
    display: block;
}

Chrome

Answer №1

It's quite challenging, as websites may appear differently across various browsers; internet explorer is particularly troublesome. One potential solution is to try deleting the following code snippet:

 width: 100%;

There are numerous articles available on this topic that might provide further insights.

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

Ways to eliminate project title from the URL

After removing the hash tag from the URL with $locationProvider.html5Mode(true), I attempted to address the refresh issue by adding the following code to my .htaccess file: Options +FollowSymlinks RewriteEngine On RewriteBase /test/ RewriteCond %{REQUEST_ ...

What could be causing my page div to continuously expand on ios devices only?

I'm facing a strange issue where the div element in my document keeps growing endlessly. This problem has been observed on iPhone with iOS 5.1 and 6. It's fascinating to watch the height and min-height values of the page increase continuously, ca ...

Navigating into iframe can be tricky when the previous iframe is not properly closed in Selenium Webdriver. Here

One issue we are facing is the excessive use of iframes in HTML. It has become troublesome to locate elements as some are buried within multiple layers of iframes. I'm trying to access an element inside the outermost iframe (the second one), but I&ap ...

Interactive Div Updates Dropdown Selections Automatically

// function to add set of elements var ed = 1; function new_server() { ed++; var newDiv = $('#server div:first').clone(); newDiv.attr('id', ed); var delLink = '<a class="btn btn-danger" style="text-align:right;m ...

Creating a Javascript function to mirror an HTML object

Essentially, I have HTML code that includes variables html = `<div>${product.id}<img src="${product.src}"/></div>` then I simply update the DOM with: document.querySelector('.container').innerHTML = html; Everything seems to ...

What is the best way to utilize Selenium for choosing an item from a drop-down menu?

My current challenge involves using Selenium to interact with a dropdown menu in Python. The HTML snippet below shows the structure of the website I'm working on. <select data-id="1388874259461-k9k0y" name="walletselectedbitcoin" id="selectWallet" ...

How to style the first dropdown value in AngularJS to appear bold?

Is there a way to style only the first value in a dropdown list as bold without using jQuery? Here is the code for the dropdown: <div class="col-xs-3"> <select-box id="ad-version-select" options="curItem.stats.version" model="state.version" i ...

Creating a PDF from slides using tools like mkd2pdf or wkhtmltopdf has never been easier. This

I am exploring the possibility of creating PDF files using mkd2pdf, a tool based on wkhtmltopdf. Mkd2pdf has the ability to generate PDFs from markdown content and utilizes a CSS file for styling purposes. For example: h1 { page-break-before: always; } ...

Tips for positioning an element at the bottom of a flexible container with variable size

How can I ensure that the Author element in this jsfiddle is aligned properly between the card elements? I am struggling to adjust the size of the details container to match the variable sizes of other elements in the same row. The aim is to have the Auth ...

Achieving Style= Background-Img URL Extraction with Cheerio

I am attempting to retrieve the URL of the background image. The background image is located within an a href tag. The a href tag contains the following style: style="background-img:url("")" I am using cheerio (a Node.js module simila ...

What is the best way to create a flip page effect in a book without relying on absolute positioning? Alternatively, how can a relatively positioned div adjust to the size

Check out this Codepen I have created a div that simulates the pages of a book, with front and back elements. When you click on the page, it flips to reveal the reverse side. To style the book properly, I set the parent div (which houses the page divs) t ...

The specified number of columns and width values are being disregarded

The Challenge While using the CSS column-property to create columns on my webpage, I have encountered some unusual behavior with the layout engine. Specifically, I have set up the following styling: body { padding: 0; background-color: black; margi ...

What steps should I take to make my alert vanish?

I'm facing a challenge with an alert I created using Bootstrap in my Django project. Despite following instructions from the bootstrap website, I can't get the alert to disappear when I click on the x button. The errors I encountered are: Uncau ...

Regularly changing the text shown in an HTML element and halting when the content array is exhausted

I have a strong desire to develop my own speed reading software. To achieve this goal, I am in need of text that changes continuously and stops once the passage is completed. I attempted storing the contents in an array and managed to make the text change ...

Encryption Extensions for Video Content in HTML5

I know this might not be the typical question, but I'm hoping the knowledgeable community here can help me out. After searching high and low on the internet with various search terms, I've yet to find a comprehensive guide on how to actually imp ...

Seeking assistance in understanding how to validate images in Javascript code with the use of Selenium WebDriver. Any t

I am looking to implement the following code to verify if the images on the webpage have loaded successfully. Would anyone be able to clarify how this javascript code actually confirms whether the images are loaded or not? ArrayList<WebElement> imgE ...

jQuery Form: Despite the Ajax response being visible on the page, it does not appear in the source code

Utilizing Jquery Form for an Ajax image upload. This is the relevant HTML code: <div class="input_con imageupload_con"> <form action="processupload.php" method="post" enctype="multipart/form-data" id="MyUploadForm"> < ...

Guide on aligning a popup next to the button that activated it using CSS and JavaScript

I am currently generating a dynamic quantity of divs, each containing a button that triggers a popup when clicked. I am attempting to position the popup below the specific button that activated it, but it remains static and does not move accordingly. <d ...

Adjust the size of a nested div within a bootstrap container

My dilemma arises when nesting a product slider div inside a bootstrap col-lg-x div, as illustrated below: https://i.sstatic.net/9tCVA.png The issue lies in the layout distortion that occurs within a div.row > div.col-lg-8 structure, where images are ...

When attempting to send data using jQuery to PHP, an issue arises where PHP is unable to receive the information, resulting in an undefined variable

Has anyone successfully sent data from an HTML select to a PHP file using jQuery? I've tried multiple solutions suggested here, but none seem to be working for me. Below is the code I'm using: <select id="city" name="city" > <optgro ...