Reorder the division elements within an HTML document

In my htm file, I have the following htm codes:

<div id="masthead">
    <div id="logo">
        #logo<br />
        #logo<br />
        #logo</div>
    <div id="header">
        #header<br />
        #header<br />
        #header</div>
</div>
<div id="container">
    <div id="right_col">
        #right_col<br />
        #right_col<br />
        #right_col<br />
        #right_col<br />
        #right_col</div>
    <div id="top_banner">
        #top_banner<br />
        #top_banner<br />
        #top_banner<br />
        #top_banner</div>
    <div id="left_col">
        #left_col<br />
        #left_col<br />
        #left_col<br />
        #left_col<br />
        #left_col</div>
    <div id="page_content">
        #page_content<br />
        #page_content<br />
        #page_content<br />
        #page_content</div>
</div>
<div id="footer">
    #footer <br />
    #footer <br />
    #footer <br />
    #footer </div>

Additionally, there is a css file with the following styling:

/* CSS layout */
body {
    margin: 0;
    padding: 0;
    background-color:silver;
    font-family:tahoma;
}

#masthead {
    min-width: 1000px;
}

#logo {
    float: right;
    background-color:lime;
    width: 250px;
}

#header {
    margin-right:250px;
    background-color:aqua;
}

#container {
    clear: both;
    min-width: 1000px;
}

#left_col {
    float: left;
    width: 200px;
    background-color:fuchsia;


}

#right_col {
    float: right;
    width: 200px;
    background-color:orange;
    }

#page_content {
    margin-left: 200px;
    margin-right: 200px;
    background-color:red;


}

#top_banner {
    margin-right: 200px;
    background-color:maroon;

}

#footer {
    clear: both;
    background-color:yellow;
}

After changing the order of the divs in the html code, specifically moving the "left_col" after the "page_content", the pages are not loading correctly. The "left_col" div is displaying incorrectly as shown in this image:

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

Modify the `value` of the `<input type=color>` element

Hello there! I have been working on a feature where I need users to select a color and have that choice reflected in the value field. Initially, I assumed this could be achieved easily through Bootstrap's features since my project is based on Bootstr ...

Encountering issues when trying to show a JSON-formatted list on an HTML page, preventing it

I'm currently encountering an issue with displaying JSON formatted data in an HTML file. The code seems to work fine, but the list is not being displayed. Here's a snippet of my code... import { Component } from '@angular/core'; import ...

Tips for updating contact form without reloading the page using HTML, PHP, and JavaScript

Struggling to grasp this concept, didn't realize a basic form could be so complex. I'm still learning the ropes when it comes to the back-end development. The form I'm working on has 3 fields: name, email, and message. All I want is a simpl ...

Creating a Stable Left Navigation Bar with Bootstrap CSS

I am currently developing a website using Bootstrap CSS and I'm aiming for it to have a similar layout to the Bootstrap Dashboard example. However, I've encountered an issue with the right section of the fixed sidebar scrolling horizontally when ...

Python CGI presents a challenge when dealing with HTTP GET parameters

I'm currently studying Python web development. When I access the HTML, I see Ferrari, Fiat, Ford as expected. However, when I click on Ferrari, it leads to a new page showing make and model instead of Ferrari Dino. Can you assist me in identifying th ...

"Classes can be successfully imported in a console environment, however, they encounter issues when

Running main.js in the console using node works perfectly fine for me. However, when I attempt to run it through a browser by implementing an HTML file, I do not see anything printed to the console. Interestingly, if I remove any mentions of Vector.ts fro ...

Make sure the page preloader is visible before any other content is loaded

Currently, I am working on a straightforward preloader page that remains visible until the main content of the page is completely loaded. Despite the functionality of the loading page, my main concern lies in the quick display of the main content before th ...

What is the best way to ensure the second navbar stays at the top when scrolling, after the first one?

Looking for a solution to create a navbar with two distinct sections for contact info and the menu. The goal is to have the contact info disappear when scrolling down, while the menu remains fixed at the top of the page. When scrolling back up, the menu sh ...

Tips for modifying the text color of a legend in a d3js chart

Title: I'm currently learning how to create a stacked bar chart following a tutorial. Even though I've managed to change the color of the axis text to white on my black background, I'm struggling to do the same with the legend text. Here&apo ...

What is the initial value assigned to the "position" attribute of a DIV element by default?

Can you tell me what the default value for the "position" attribute of a DIV is? Similar to how a DIV's display property is BLOCK, I'm curious about the default property for the position attribute. ...

How can one retrieve the 'alt' attribute text from an image tag on a webpage using the JSOUP library in an Android application?

Extracting the 'alt' text from an 'img' tag in Android after clicking a button is causing issues. The attempted code is not working as expected. Here is the snippet of the code that was used: Document doc = Jsoup.connect(url).get(); ...

Is there a way in CSS to set a label's width equal to the width of its content?

I am facing an issue where I need the question mark div to be positioned right next to the top row of text in the label it is associated with. Can someone suggest some styles that can be applied to the label to adjust the width and spacing so that it match ...

ul background transparency only works with absolute positioning if using a Transparent PNG

Encountering a strange issue was the order of the day, as I found myself faced with an unordered list featuring a background image in the form of a semi-transparent PNG. To my surprise, the transparency only became visible once I designated the unordered l ...

Accessing a global variable in AngularJS while using ng-data-repeat functionality

Currently in my Angular project, I am displaying block information using the ng-data-repeat directive and accessing various values. Below is a snippet of a table utilizing this repeat feature: <tr class="fader" ng-repeat='b in blocks'> ...

Switch up the picture when you press on it

I have a task involving a table where I want to switch out an image in the <td> when it is clicked, using a URL that I specify beforehand. The URL of the image will be provided when clicking on a link within the page. For example: index.html?type=d ...

Angular neglects the specified animation timing

I created a sidebar component that relies on the sidebarExpanded state passed through Input(). Despite the correct animation trigger upon input change, the width adjustment happens abruptly. Interestingly, the same animation code works flawlessly in anothe ...

What steps can I take to make this JavaScript burger menu function properly?

I've been following an online tutorial to spice up my navigation bars a bit, but I'm having trouble getting my burger menu and animations to work. I've included the JS file above </body> (I also tried moving it into the <head>). ...

Is there an equivalent of getElementById for placeholder text?

I need help automating the input of information on a webpage using JavaScript. Each field has a unique ID, like this: <div id="cc-container" class="field has-float-label"> <input placeholder="ccnumber" id="credit_card_number" maxlength="16" ...

What is the best way to align my cards side by side using html/css/js?

Check out this piece of HTML code I have: <div class="container"> <div class="column"> <div class="post-module"> <!-- Inserting content here --> </div> <div class="post ...

Ways to verify HTML code consistency for mobile phone web applications on various devices

I am in the process of developing a mobile-friendly HTML/JavaScript web page that needs to be functional on older mobile devices as well. This webpage will consist of select lists, buttons, links, and basic JavaScript for some variables. Is it feasible ...