Creating designs to cater to outdated web browsers, prioritizing backward compatibility

I am looking to synchronize my design for older browsers like IE7 and above. I have designed the layout specifically for these browsers, and after researching, I found a tool that uses Javascript to implement the code. Is there an alternative method to achieve this?

Below is my HTML code:

<!DOCTYPE html>
<html lang="en-us">
<head>

    <title>Nitro Data Networks Teleserv Corporation</title>

    <meta name="viewport" content="width=device-width">
    <meta charset="utf-8">

    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Dosis' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>


    <link rel="stylesheet" type="text/css" href="http://nitrodatanetworks.com/assets/main.css"/>
    <link rel="stylesheet" type="text/css" href="http://nitrodatanetworks.com/assets/contact.css"/>
    <script src="http://nitrodatanetworks.com/assets/modernize.js.css"/>" type="text/javascript"></script>


</head>


    <body>
    <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '--snip--', '--snip--');
  ga('send', 'pageview');

</script><div id="wrapper">
    <div id="header">
        <ul>
            <a href="http://nitrodatanetworks.com/index.php">   <li>
          <img src="https://cdn2.iconfinder.com/data/icons/pittogrammi/142/65-32.png">Home</a></li>
               <a href="http://nitrodatanetworks.com/index.php/welcome/login">   <li><img src="https://cdn2.iconfinder.com/data/icons/pittogrammi/142/91-32.png">Login</a></li>
             <a href="http://nitrodatanetworks.com/index.php/welcome/profile">  <li><img src="https://cdn2.iconfinder.com/data/icons/pittogrammi/142/88-32.png"> Profile</li>
             <a href="http://nitrodatanetworks.com/index.php/welcome/service">    <li><img src="https://cdn2.iconfinder.com/data/icons/pittogrammi/142/16-32.png">Services</li>
          <a href="http://nitrodatanetworks.com/index.php/welcome/contact"> <li><img src="https://cdn2.iconfinder.com/data/icons/pittogrammi/142/04-32.png">Contact us</a></li>
            <div id="social">
            <li>Like Us!<img src="https://cdn1.iconfinder.com/data/icons/social_balloons/48px/social_balloon-14.png"></li>
             <li>Tweet!<img src="https://cdn1.iconfinder.com/data/icons/social_balloons/48px/social_balloon-05.png"></li>
              <li>Plus!<img src="https://cdn1.iconfinder...

My HTML looks like it could use some love.

#dots {
    display: block;
    width: 50%;
}

#button:hover {
    color: purple;
    background-color: silver;
}

Answer №1

It seems like you're attempting to utilize Modernizr. First and foremost, I want to point out that the syntax in your implementation is incorrect. Here is what you currently have:

<script src="http://nitrodatanetworks.com/assets/modernize.js.css"/>" type="text/javascript"></script>

What you should have instead (Note: File extension)

<script src="http://nitrodatanetworks.com/assets/modernize.js" type="text/javascript"></script>

Understanding how Modernizr operates:

Upon page load, Modernizr scans and identifies which "features" are supported by the current browser. It then adds specific class names to the html tag of the page. For instance, if you are utilizing CSS Gradients and open the page on an outdated browser lacking support for it, the html tag will appear like this

<html class="no-cssgradients">
.

You now have the ability to define rules targeting situations where CSS Gradients are not available.

For example, here's your default class (excluding vendor prefixes)

.exampleclass {
 background: linear-gradient(to bottom, #4c4c4c 0%, #000000 0%, #000000 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%);
}

As a fallback, you can use the no-cssgradients class. This means that when CSS Gradients are unsupported, this class will apply to your element.

.no-cssgradients .exampleclass {
 background: #000000;
}

While the fallback property can be included within the default tag, I separated them here for demonstration purposes. The same approach can be applied to other unsupported elements identified by Modernizr. There are more functionalities offered by Modernizr beyond just classes, so I suggest exploring their website for further information.

Edit: I also recommend validating your HTML & CSS code to address the syntax errors present throughout. Best of luck!

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

Is there a way to determine if the cursor is currently focused on an input field, textarea, or select dropdown

To successfully submit a form after running an AJAX request and checking the result, you can use an "a" tag with an onclick function. However, using the enter key to submit the form may skip the AJAX code execution. One solution is to bind a keypress eve ...

combining the use of $.ajax

Currently, I have multiple ajax calls scattered throughout my page and I am looking to streamline them into a single function. In various sections of my code, you will find functions like this: function AjaxCallOne () { //do something $.ajax({ type: ...

Tips for designing custom dropdown menus within the WordPress menu editor

Just starting out with coding. I recently learned how to customize my website's navigation menu using menus section in the Wordpress dashboard. However, I'm struggling to create dropdown menus for child/sub pages without manually entering all th ...

"Adding page-specific scripts with the help of nunjucks and express app: A step-by-step guide

What is the most efficient way to manage scripts that are common for all pages and scripts that are specific to certain pages using nunjucks as the template engine and express 4 as the backend framework? --- site --- public |___js |___ script.js (f ...

Assurance of retrieving information

I am looking to extract specific information from the following website . I have implemented Promises in order to retrieve data about planets, then films associated with a particular planet object. My next goal is to access data within the species array ne ...

AngularJS parent selector nearest to the element

I have successfully implemented a code to close a custom popup using jQuery, but I am looking for a solution that utilizes AngularJS instead of jQuery. Can anyone assist me in finding the equivalent of this.closest() in AngularJS? I aim to hide .popOverla ...

The transparent DIV/waiting message may not be displayed in IE10

Here is a DIV container that serves as a transparent background with a loading message. This is the HTML code for the DIV container: <div id="generatingexcel" style="display:none; position: fixed; width: 100%;height: 100%; z-index: 999; top: 0; left: ...

Execute a function every 10 seconds after it finishes running (JavaScript)

I am currently facing a challenge with a function that utilizes the "post" method to retrieve data from the server for processing. The amount of data retrieved varies, leading to longer completion times (around 30 seconds). My goal is to have this functi ...

Checking authorization with CognitoUser solely for "code" provided by CognitoUser (npm: amazon-cognito-identity-js)

Currently, I am in the process of implementing the "forget password" feature. However, I have encountered an issue where I would like to verify the "verification code" first before setting a new "password". Unfortunately, the system currently requires bo ...

The functionality of the disabled and checked options on the radio button seems to be malfunction

Within an Angular HTML document, I have a set of radio buttons that share common names. I am attempting to update their disabled and checked properties from a .ts file, but the changes are not taking effect. Here is the code snippet: let elements = docume ...

Troubleshoot: Difficulty with accessing nested tag name using getElementsByTagName

I'm currently working with a div that contains a table and its data pulled from a database. <div id="content"> <table> <tbody> <tr> <th class="header" colspan="2">Food items include:</th> </tr> ...

`In AngularJS, the same URL ('/') can display different templates depending on the user's login status.`

What is the most effective way to configure routing and templates in AngularJS to display a distinct front end and login area for visitors, while presenting a dashboard to logged-in users all on the same base URL ('/')? These two pages have comp ...

The ReactJS code encountered an error when attempting to access the 'location' property of an undefined or null reference

My Reactapp is encountering an error due to a specific file. import React from 'react'; import { Router, Route } from 'react-router'; import App from './components/App'; import About from './components/About'; im ...

XSLT: Tips for preventing the use of self-closing tags within HTML attributes

I am new to XSLT and I'm currently troubleshooting an issue with some XSLT code (version 2.0) that was written a few years ago. Here is a snippet of the XSLT code: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ...

Creating a post request in Express.JS with an empty object

Currently, I am working with Express version 4.18.2. I have created routing and controller files along with an HTML form that uses the POST method. However, when I submit the form, I attempt to display the req.body object sent in the request through the co ...

Does the PHP include function act as an HTTP request?

After coming across an article highlighting the negative impact of using excessive HTTP requests on server speed, I started wondering about the performance implications of PHP includes. Specifically, I'm curious if sending 4 AJAX requests compared to ...

Reducer is unaware of my current state within react redux

I am currently developing an application that allows users to add items to a collection. The process involves the user inputting the name of the collection item, and the corresponding item is added to the collection. However, I encountered an issue when di ...

Having trouble scrolling to the top in Flickr Search using AngularJS, the results are restricting my movement

I recently followed a tutorial on creating a Flickr Search App with AngularJS (https://www.youtube.com/watch?v=lvGAgul5QT4). I managed to show the search results on my page, but encountered an issue: I couldn't scroll all the way back up to the search ...

center text within grandparent element

Within my Angular application, I have a list where each item can be comprised of either a small image with accompanying text or just text alone. li { display: flex; border: 1px solid black; width: 80%; margin-bottom: 5%; list-style: none; po ...

Angular 6 issue: Bootstrap 4 carousel indicators not responsive to clicks

I am currently working on incorporating a Bootstrap 4 carousel into my application, but I seem to be encountering issues with the indicators. Ideally, clicking on any of them should navigate you to the corresponding photo, similar to this example: https:// ...