The appearance of the page varies between Ubuntu and Windows 7 when viewed on Firefox 31

This situation is completely new to me: The page I designed appears differently on Firefox 31 in Ubuntu (correct):

compared to Windows 7 (wrong):

I was able to replicate this issue on another Windows 7 machine using FF 31. My HTML and CSS both validate with W3C, and my CSS is lint-free. There's nothing unusual about what I'm doing here. My understanding so far has been that a browser should be platform-independent. Can anyone offer an explanation for this behavior and any suggestions on how to fix it? Thank you in advance.


HTML:

<!DOCTYPE HTML>
<html>
<head>
  <title>FortavaScript | The Simple Pendulum</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="description" content="This program solves the equation for the total energy of a simple pendulum to illustrate conservation of mechanical energy for large oscillations.">
  <meta name="keywords" content="simple, pendulum, period, oscillations, amplitude, nonlinear, gravity">
  <meta name="author" content="Joel" >
  <meta name="generator" content="Bluefish 2.2.5" >
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" type="text/css" href="style.css">
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
    });
  </script>
  <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  <script type="text/javascript" src="amp.js"></script>
  <script type="text/javascript" src="Flot/jquery.js"></script>
  <script type="text/javascript" src="Flot/jquery.flot.js"></script>
</head>
<body onload="amp()">
  <div class="header2">
    <h2>The Simple Pendulum</h2>
  </div>
  <div class="content">
    <p>A common example of a mechanical system that exhibits oscillatory motion is the simple pendulum. A simple pendulum is an idealized system consisting of a bob of mass $m$ attached to the lower end of a rigid rod of length $L$ and negligible mass. The default parameters of this program generate a stable numerical solution when simulating large amplitude oscillations.</p>
  </div>
  <div class="header3">
    <h3>Oscillations of a Pendulum</h3>
  </div>
  <div class="program">
    This program solves the equation for the total energy of a simple pendulum to illustrate conservation of mechanical energy for large oscillations.
  </div>
  <div class="model">
    $E = \frac{1}{2} m L^2 \omega^2 + m g L (1 - \cos \theta)$
  </div>
  <div class="form">
    <form id="pendulum">
      <table class="form">
        <tr>
          <td>
            <label><span class="rollover">Initial angle<span>0.0 &le; <i>&theta;</i> &le; 1.6 rad</span></span>, $\theta_0$, of the mass:</label>
            <input type="number" name="theta0" id="theta0" value="0.1" min="0.0" max="1.6" step="0.1"> rad
          </td>
        </tr>
        <tr>
          <td>
            <label><span class="rollover">Ratio<span>1.0 &le; <i>g</i>/<i>L</i> &le; 10.0</span></span> of $\frac{g}{L}$:</label>
            <input type="number" name="read_ratio" id="read_ratio" value="9.0" min="1.0" max="10.0" step="0.1">
          </td>
        </tr>
        <tr>
          <td>
            <label><span class="rollover">Initial angular velocity<span>0.0 &le; <i>&omega;</i> &le; 6.0 rad/sec</span></span>, $\omega_0$, of the mass:</label>
            <input type="number" name="omega_read" id="omega_read" value="0.0" min="0.0" max="6.0" step="0.1"> rad/sec
          </td>
        </tr>
        <tr>
          <td>
            <label><span class="rollover">Time-step<span>0.001 &le; <i>dt</i> &le; 0.1 sec</span></span>, $dt$, of the system:</label>
            <input type="number" onchange="three" name="dt_read" id="dt_read" value="0.01" min="0.001" max="0.1" step="0.001"> sec
          </td>
        </tr>
        <tr>
          <td>
            Period of the pendulum: <span id="output"></span> sec
          </td>
        </tr>
      </table>
      <input type="button" value="Evaluate" onclick="amp()">
    </form>
  </div>
  <div class="box">
    <div class="container">
      <div id="placeholder" class="placeholder"></div>
    </div>
  </div>
  <div class="download">
    <a class="fortran" href="amp.f08">Download the original Fortran source</a>
    |
    <a class="java" href="amp.java">Download the translated Java source</a>
    |
    <a class="js" href="amp.js">Download the JavaScript</a>
  </div>
  <div class="mail">
    <p class="feedback">
      <a class="physics" href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="186870616b717b6b586b6d7c7c7d767471767336767d6c">[email protected]</a>?subject=The%20Simple%20Pendulum">Errata</a>
    </p>
  </div>
  <div class="center"><!-- W3C -->
    <p class="center">
      <a class="badge" href="http://validator.w3.org/check?uri=http%3A%2F%2Fpages.suddenlink.net%2Fphysics%2Famp.htm">
        <img src="HTML5_Badge_32.png" alt="Valid HTML!">
      </a>
      <img src="valid-css-blue.png" alt="Valid CSS!">
    </p>
  </div>
  <div class="footer">
    Copyright &copy; 2014 Joel DeWitt
  </div>
  <div class="fortavascript"><a href="index.htm">FortavaScript</a></div>
</body>
</html>

CSS:

body {
  background: url(background.png) repeat-x;
  font: 18px/1.5em "proxima-nova", Helvetica, Arial, sans-serif;
}
a {
  border: 1px solid ghostwhite;
  text-decoration: none;
}
...

A preview of the page can be seen here.

Answer №1

For a more consistent look across different browsers, I suggest using a CSS reset. These resets are designed to address the differences in how browsers interpret and display styles, ensuring a more uniform appearance. When implementing a CSS reset, you may need to manually style certain elements that would normally have default styling applied, such as setting font weight for strong and b tags, adjusting margins for paragraphs, etc. Personally, I find Yahoo's CSS reset to be a reliable choice.

In addition, double-check that you have properly imported the proxima-nova font in your project, although your CSS fallback should still work effectively.

Answer №2

After troubleshooting, I discovered that the issue was actually with the font I had selected (Computer Modern) while using inline MathJax symbols in my document. To simplify things, I adjusted my CSS font choices to

font: 1em "Computer Modern", serif;
, and added the following:

@bulletproof-font-face {
  font-family: "Computer Modern";
  src: url('cmunss-webfont.woff') format('woff');
}
@bulletproof-font-face {
  font-family: "Computer Modern";
  src: url('cmunsx-webfont.woff') format('woff');
  font-weight: bold;
}
@bulletproof-font-face {
  font-family: "Computer Modern";
  src: url('cmunsi-webfont.woff') format('woff');
  font-style: italic, oblique;
}
@bulletproof-font-face {
  font-family: "Computer Modern";
  src: url('cmunbxo-webfont.woff) format('woff');
  font-weight: bold;
  font-style: italic, oblique;
}

...based on references from this post as well as one from CSS-Tricks. It's worth noting that I switched from using @font-face to @bulletproof-font-face at the suggestion of CSSLint.

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

Utilize CSHTML Script to Show HTML Content When SQL Query Results in Null

I have a CSHTML Script that a friend has written, and I am currently making some changes to it. I have a SQL Query saved as a variable and if this query returns NULL, then I want to display different HTML compared to when it returns results. Below are the ...

Issue with displaying background image in h2 element

Consider me a novice who learns primarily through trial and error. Unfortunately, I'm stuck on this particular issue. My goal is to have an image appear behind the h2 text on my homepage, but despite my efforts, I can't seem to make it work. You ...

What is the best way to align background shapes within a specific section on a webpage using CSS?

I've been attempting to strategically place multiple shapes in the background using CSS, but I'm facing challenges. While I was successful with my hero section at the top of the page, positioning elements in a section halfway down has proven prob ...

Tips for Implementing Large-Text Breadcrumbs with Heading Tags Using Bootstrap 5

I need assistance with creating large heading text breadcrumbs without breaking the layout. Any suggestions? <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d8bab7b ...

My code written using Visual Studio Code is not displaying properly when I view it in my browser

I have been following along with a tutorial series that can be found at this link. This link will take you to the third video in the series, but I have also followed and programmed alongside the first and second videos. After installing Visual Studio Code ...

Obtaining the weight of a webpage using Selenium Automation_Framework

Currently, I am in the process of creating performance-related tools for web pages within a Selenium framework designed for .NET systems. With a focus on page performance, I am specifically analyzing page load time and page weight. In order to measure th ...

Understanding the structure of html elements

Within my downloaded HTML files, I consistently have key executives mentioned at the beginning of each file (like "Dror Ben Asher" in the code snippet below): <DIV id=article_participants class="content_part hid"> <P>Redhill Biopharma Ltd. (NA ...

Demonstrate how to pass a newline character from Ruby on Rails to JavaScript

I am working with a .js.erb file that is activated by a JavaScript function. Within this js.erb file, I have the following snippet of code: event = <%=raw @event.to_json %> $('#preview-event-body').html(event.body); The value of event.bo ...

What changes can be made to the HTML structure to ensure that two form tags function separately?

Hey there! I'm currently tackling a web project that involves incorporating two form tags on one page, each with its own distinct purpose. Nevertheless, it appears that the inner form tag isn't behaving as it should. My suspicion is that this iss ...

Load HTML 5 video on a webpage after all other elements have finished loading

Hello there! I'm trying to figure out a way to load an HTML 5 video after the page has already loaded. Currently, the video pauses all site interaction until it's fully loaded, but I'd prefer to have it display an image first and then autopl ...

Ways to enable JavaScript code to accept input from both a text field and a text

I have a JavaScript code that allows users to input text and choose to make it bold, italicized, or underlined. For example, if the user checks the bold option, the text will appear in bold format. Here is the JavaScript code I am using: $('input[n ...

Tips for creating consistent spacing between elements using Tailwind CSS version 3

I am currently utilizing Tailwind CSS in conjunction with next.js for my project. I have a total of 8 images, each varying in size, and my goal is to display 4 images per row on medium and large devices, while displaying 2 images per row on small devices. ...

Vertical Image Alignment in Bootstrap 3

Looking for some help with a basic HTML structure here. I have a single row divided into two columns, each containing an image of the same size. What I need is to center one image both horizontally and vertically in each column. <div class="containe ...

Modifying jQuery CSS causes certain CSS rules from a file to be deleted

When using jQuery to change the css of an element, I've noticed that it can remove some previously specified css rules for that element. For example, .className, .className2, etc... { background-color: black; color : silver; } .className: ...

push one element to fit in between two adjacent elements

Is there a way to make my responsive webpage ensure that the full-screen element appears between sibling elements when viewed on mobile devices? Check it out on desktop or on mobile here. I have three (div) elements: two in one row and another in a separa ...

HTML input field that shows a hint text when selected

Is there a way to create a text box that shows a hint when clicked on? For example, you can see this feature by clicking on the address text box in the following link: ...

Setting the font size for the entire body of a webpage globally is ineffective

Technology Stack: Nuxt.js + Vuetify.js Problem: Unable to set global body font size Solution Attempt: I tried to adjust the body font size to 40px in ~/assets/style/app.styl: // Import Vuetify styling ...

Centered CSS Box with Pointing Arrow

I'm looking for a way to create a unique div design that includes an arrow pointing downwards attached to the bottom. After some exploration, I was able to achieve this look through this process: http://jsfiddle.net/hyH48/. However, my challenge lies ...

Trigger a JavaScript event when attempting to input the maximum number of characters

I am currently facing a challenge with implementing a tooltip on a text area that has a maximum character limit of 500. The tooltip should only appear when the user reaches the maximum character count and attempts to input more characters. My previous appr ...

Improve the loading speed of large datasets into HTML tables

I have a problem where I generate an HTML table from code behind to display data like a grid (Note: I am not using GridView). When the data is large, around 2000 rows, it causes the application to display a white page as if it has hung. What is the best w ...