My basic HTML site is displaying incorrectly on Firefox, Safari, and IE

I have recently built a basic website using HTML and CSS.

After developing it primarily on Chrome, I've noticed that the layout is not rendering correctly on Firefox, Safari, and Internet Explorer. There are issues with the alignment of tags and buttons.

What declarations should I make to ensure the site is compliant for all browsers, especially Chrome?

#wrapper {
  /*background-color: #ffff99;*/
  width: 1150px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  font-family: Candara, Calibri, Segoe, 'Segoe UI', Optima, Arial, sans-serif;
  font-size: 16pt;
  font-style: normal;
  font-variant: normal;
  font-weight: 500;
  line-height: 26.4px;
}
header {
  background-color: #a6dd88;
  height: 150px;
  padding-top: 5px;
  position: relative;
  padding-bottom: 0px;
}
#company {
  position: relative;
  left: 250px;
  bottom: 115px;
  font-size: 35pt;
  color: #003300;
}
#iaw {
  position: relative;
  left: 250px;
  bottom: 140px;
  color: #2db300;
  font-weight: 200;
}
#p1 {
  position: relative;
  bottom: 170px;
  right: 340px;
  color: #005e00;
  font-weight: 200;
  text-align: center;
}
#p2 {
  position: relative;
  bottom: 255px;
  right: 80px;
  color: #005e00;
  font-weight: 200;
  text-align: center;
}
#comms {
  float: right;
  position: relative;
  bottom: 455px;
  right: 45px;
}
nav {
  width: 510px;
  position: relative;
  left: 650px;
  bottom: 335px;
  display: inline-block;
  /*background-color: blue;*/
}
a {
  text-decoration: none;
}
#content {
  background-color: #79bf56;
  padding: 10px 50px 10px 50px;
}
.button {
  background-color: #4CAF50;
  /* Green */
  border: none;
  color: white;
  padding: 7px 8px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14.5px;
  /*margin: 4px 50px 2px 50px;* <Button space inbetween>*/
  -webkit-transition-duration: 0.4s;
  /* Safari */
  transition-duration: 0.4s;
  cursor: pointer;
}
.button1 {
  background-color: white;
  color: black;
  border: 2px solid #4CAF50;
}
.button1:hover {
  background-color: #4CAF50;
  color: white;
}
footer {
  background-color: #a6dd88;
  position: relative;
}
#footer {
  text-align: center;
}
ul {
  list-style: none;
  text-align: center;
  font-size: 10pt;
}
table,
td,
th {
  /*border: 1px solid #003300;*/
  text-align: center;
}
table {
  /*border-collapse: collapse;*/
  position: relativ...
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>Who We Are</title>
  <link rel="stylesheet" type="text/css" href="chambers.css">
</head>

<body>
  <div id="wrapper">
    <header>
      <img id="logo" src="http://www.carlogos.org/uploads/car-logos/Jaguar-logo-6.jpg" alt="Company" height="100px" width="130px" />
      <a href="Index.html"><h1 id="company">This Text appears correctly</h1></a>
      <h6 id="iaw"><em>This Text appears correctly</em></h6>
      <h6 id="p1">This Text appears correctly<br> This Text appe...
      <h6 id="p2">This Text appears correctlappears correctly<br> 
    appears correctly</h6>
      <h5 id="comms">This Text appears correctly<br>This Text ap...
      <nav>
        <a href="index.html">
          <button class="button button1">Home</button>
        </a>
        <a href="WhoWeAre.html">
          <button class="button button1">Who We Are</button>
        </a>
        <a href="WhyUs.html">
          <button class="button button1">Why Us?</button>
        </a>
        <a href="Testimonials.html">
          <button class="button button1">Testimonials</button>
        </a>
        <a href="ContactUs.html">
          <button class="button button1">Contact Us</button>
        </a>
      </nav>
    </header>
    <div id="content">
      <p id="wwat">This Text appears correctly</p>
      <table id="rtb">
        <tr>
          <td>
            This is text there that was entered but appears incorrectly in FireFox and Internet Adventure. This is text ...g
          </td>
        </tr>
      </table>
    </div>
    […]

Answer №1

Your code needs some cleaning up, but to address the error, focus on adjusting these specific classes:

table {
  /*border-collapse: collapse;*/
  position: relative;
  height: auto;
  /* bottom: 260px; < remove this */
  /* margin-bottom: -250px; < remove this */
}

Additionally, consider modifying:

table#rtb {
  text-align: center;
  position: relative;
  /* bottom: 325px; < remove this  */
  left: 10px;
  border: none;
}

See more details at this link.

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

Creating a table with both a fixed header and a fixed column using only CSS

I'm looking to create an HTML table with a fixed header and fixed first column, but I want to avoid using JavaScript or jQuery to set scrollTop/scrollLeft for smooth functionality on mobile browsers. I found a solution that fixes the first column he ...

What could be causing the lack of functionality for my button click in my JavaScript and HTML setup?

Currently, I am attempting to implement a functionality where I have two buttons at the top of my page. One button displays "French" by default, and when I click on the "English" button, it should replace the text with "French" using show and hide methods. ...

Utilize socket.io to send information from a nodejs server to an html webpage

I've been working on transferring data from Node.js to HTML using socket.io. Initially, I successfully transferred text from Node.js to HTML with the following code: Node.js code : app.post('/timer', function(req, res){ ...

Tips on collapsing margins of floating elements

Is there a way to eliminate the vertical margin between these floating divs? .container { display: block; padding: 1px; max-width: 500px; } .float-left { display: block; float: left; margin: 20px; } .float-right { display: block; flo ...

Creating an HTML list based on a hierarchical MySQL table structure

I have retrieved a hierarchical table showing different elements and their parent-child relationships as follows: id| name | parent_id | header 1 | Assets | 0 | Y 2 | Fixed Assets | 1 | Y 3 | Asset One | 2 | N 4 | ...

Python (Selenium) - Guide on extracting and storing data from multiple pages into a single CSV file

I am facing a challenge with scraping data from a web page that contains a table spanning multiple pages. I am using Python with selenium for this task. The website in question is: The issue I am encountering is related to navigating through the pages of ...

Trouble with the x-cloak attribute in alpine.js

Experience with TailwindCSS and AlpineJS in my current project has brought to my attention a slight issue with the header dropdowns flashing open momentarily when the login page loads. I attempted to use x-cloak to address this, but encountered some diffic ...

What is the reason behind flex causing the hr element to have a width of 0?

Whenever I attempt to place an hr element inside a container that has display: flex, it mysteriously disappears. (Removing display: flex makes it reappear, leading me to believe that this is indeed the cause.) I stumbled upon a blog post that suggested fl ...

Booking form pop-up appearing beneath the section

Currently, I am in the process of adding a booking form to the main page of . However, I seem to be encountering an issue where a popup appears below the section it is supposed to open within when selecting the number of persons. Despite adjusting the z ...

Determine the sequence of a div based on its class

Here is the code snippet I am working with: <div class="test"></div> <div class="test"></div> <div class="test"></div> <input type="button" class="button" value="get number"> <div class="test"></div> & ...

Tips on personalizing the default html template in nuxt

Struggling to customize the default page from my Nuxt app due to limited documentation. Link to Documentation I'm interested in extracting only certain elements like the title or links in the head section. For example, how can I access just the li ...

Creating a default option of "please select" on an Angular select element with a null value for validation

Within my Angular application, I am using a select element with an ngFor loop: <select formControlName="type" required> <option *ngFor="let type of typeList" [ngValue]="type.value">{{ type.caption }}</option> </select> When view ...

Unable to display the absolute path of the image src in WebStorm

Hey there! I recently started learning HTML5 and have been using WebStorm on my trusty Macbook Air for about two weeks now. I've encountered a problem with image sourcing that has left me puzzled. Here's my question: Why is it that images from ...

Modifying characters within a designated class definition

I'm working on integrating Isotope with a CuteNews system, and in order to make the filtering function properly, I need to include some identifiers in my class declaration for each isotope item. Link to Isotope In CuteNews, my news items can have mul ...

Error: Label out of place in Material-UI Select

Can anyone help me understand why the Select label is misplaced in MUI5? https://i.sstatic.net/gvqff.png This is the Textfield label: https://i.sstatic.net/zrgqF.png This is the Select label: https://i.sstatic.net/GspRC.png Here is the code snippet: ...

Having difficulties executing protractor tests on Safari

In my Angular7 project, everything runs smoothly in Chrome with all E2E tests passing without any issues. However, when trying to run the tests in Safari, Protractor crashes and throws an error. Initially, I had configured my protractor.conf.js file as fo ...

An effective method for utilizing a multiple choice input (presented as buttons) for entering data into a database using html, css, and js

I'm trying to figure out the coding process using buttons and input It's giving me a result, but only allows for a single choice Although I have limited experience with this, my goal is to create a multiple choice selection for days of the week ...

Intern.js: Implement a function to dynamically load browser extensions based on configuration settings in Firefox

Currently, I am utilizing Intern.js for carrying out functional tests on various browser extensions. Successfully pre-loading a chrome extension into the browser can be achieved with this configuration: { "capabilities": { "selenium-version": "3.5 ...

What is the best way to ensure uniform height for all div elements using JavaScript?

I'm working on creating a tool that can find the tallest element among a group of elements and then adjust the height of all elements to match the tallest one. Within this tool, I'm attempting to pass a selector to a JQuery method that is locate ...

Track how far visitors scroll into the inner content area using Google Tag Manager

Our website features a left-side vertical navigation menu. In order to measure scroll depth, we incorporated Tag Manager code. However, the Tag Manager code triggers on every page load due to us fixing the body scroll and implementing a custom scroll for t ...