Attempting to place a table within a page layout consisting of three columns

I am having difficulty placing a table in the main content area of a three-column HTML file. Despite my efforts, the table keeps appearing below the header section. I have reviewed my CSS stylesheet thoroughly but haven't been able to identify a solution. Any suggestions or assistance would be greatly appreciated.

Here is the source code for the HTML file:

<html lang="en">
<head>
<!--[if lt IE9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"
</script>
<![endif]-->
<title>Enoch Bagwell's Lawn Service</title>
<meta charset="utf-8>
<link href="enoch.css" rel="stylesheet">
</head>
... (HTML file continues)

...And here are some snippets from the style sheet mentioned:

(CSS styles here...)

If you know what might be causing the table placement issue, please feel free to share your insights with me!

Answer №1

Don't forget to close the table tag properly.

<html lang="en">
<head>
<!--[if lt IE9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"
</script>
<![endif]-->

<title>Enoch Bagwell's Lawn Service</title>
<meta charset="utf-8">
<link href="enoch.css" rel="stylesheet">
</head>
<body>
<div id="container">
    <header role="banner">
        <span><a href="#special">Skip to Current Specials</a></span>
        <h1>Enoch Bagwell's Lawn Service</h1>
    </header>
    <nav role="navigation">
        <ul>
            <li><a href="index.html">Home</a></li>
            <li><a href="services.html">Services</a></li>
            <li><a href="contact.html">Contact Us</a></li>
        </ul>
        <img src="ridingmower.jpg" width="125" height="94" alt="Enoch Hard At Work">
    </nav>
    <aside role="customerssay">
        <h3>What Our Customers Say</h3>
        <p class="customers">
        <i>After hiring Enoch Bagwell's Lawn Service to prune my trees, I came home to
        find one of their workers cutting down my magnolia trees with a chainsaw. This
        man is clearly not stable, nor even knows anything about basic lawn care.</i><br>
        - Jack Morris, Norcross

        <p class="customers">
        <i>Enoch, I know this is a customer praise column, I'm really happy for ya, and I'm a 
        let you finish, but Beyonce has the best lawn care service of all time. BEST. LAWN CARE 
        SERVICE. OF ALL TIME!</i><br>
        - Kanye West, Anywhere There's Opportunity For Attention
        </aside>

        <main role="main">
            <h2>Our Services</h2>
            <img class="centered" src= "pruning.jpg" height="314" align="middle" width="519" alt="Tree Pruning"/>
            <p>Our prices vary from season to season. Here's a table of our services and charges by season. For
            our lawn care services, we strictly use <a href=https://www.deere.com/en_US/products/equipment/riding_mowers/riding_mowers.page target=_blank>John Deere</a> 
            mowers and products.
            <table border="1">
                <tr>
                    <td><b>Service</b></td>
                    <td><b>Spring</b></td>
                    <td><b>Summer</b></td>
                    <td><b>Fall</b></td>
                    <td><b>Winter</b></td>
                </tr>
                <tr>
                    <td>Lawn Mowing</td>
                    <td>$40/sq ft.</td>
                    <td>$45/sq ft.</td>
                    <td>$30/sq ft.</td>
                    <td>$20/sq ft.</td>
                </tr>
                </table>
            </p>

            <footer role="contentinfo">Copyright &copy;2015 Enoch Bagwell's Lawn Service International LLC.<br>
            Site Design by <a href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7d10091512100d0e484d4a4c3d0e090819181309531a0a14131318090909181e1553181908">[email protected]</a>">mthomps</a><br>
            </footer>
</main>
</div>
</body>
</html>

Answer №2

<table border="1">
    <tr>
        <td><b>Category</b></td>
        <td><b>Spring</b></td>
        <td><b>Summer</b></td>
        <td><b>Autumn</b></td>
        <td><b>Winter</b></td>
    </tr>
    <tr>
        <td>Lawn Care</td>
        <td>$40/sq ft.</td>
        <td>$45/sq ft.</td>
        <td>$30/sq ft.</td>
        <td>$20/sq ft.</td>
    </tr>
</table>

Try changing </p> to </table> and see if that makes a difference.

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

Can an ID and a "<?php echo ''.$variable.'' ?>" be included in the same input or video tag?

I have a task where I need to insert various Ids into a single video input tag. Specifically, I need to include the player and its row ids from PHP in this format: <video preload controls playsinline id="player[<?php echo ''.$row5['id ...

I am interested in showcasing a card when it is hovered over

I am having trouble with a hover effect to display a hidden card. I have two div elements, one is labeled single-album and the other hide. I used the + selector to set the hide div to display none initially, but the hover effect is not working as expecte ...

Is there a way to replicate this exact toggle selection functionality from Angular Material using just HTML and CSS?

I'm attempting to incorporate this functionality into my Angular project ( link ), but I'm facing challenges with styling it using CSS. Could this be due to limitations in overriding the default settings? I came across this helpful resource: sour ...

Creating a fixed column with DataTables in Bootstrap 4 and applying transparency to it within a

When using the DataTables example here, I noticed that when scrolling the table to the left, the fixed cell becomes transparent on dark rows. Could this issue be related to Bootstrap 4 or DataTables? If so, is there a workaround available to fix it? ...

What is the best way to arrange cards in a specific order with breaks in between each flip

I am currently working on creating flip cards using HTML and CSS. I have successfully implemented the hover effect which flips the cards when hovered over. Now, my goal is to make the cards automatically flip one after the other at specific time intervals ...

having difficulty retrieving website content using the ui.router

This is my HTML code: <!doctype Html> <html lang="en"> <head > <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/l ...

Tips on toggling the visibility of a div using jQuery and CSS via a toggle switch

Hey there, I need some help with toggling the opening and closing of a div when clicking on a toggle switch. $('.tog').on('click', function() { $('.cntr').show(); }); .switch { position: relative; display: inline-bloc ...

Guide to positioning an image at the center across 2 columns using Bootstrap

Looking to create a split screen Bootstrap 4 layout with an image in the center overlapping the two columns. Have successfully set up two equal columns but struggling to position the image to overlap. Have experimented with position:absolute and float:lef ...

Creating adaptable breakpoints for content using Bootstrap or pure CSS

I'm trying to create a responsive layout using the Bootstrap "row" and "col" classes, but I'm having trouble figuring out how to structure the content. Here's what I mean: https://i.sstatic.net/WkMmE.png This is my current HTML structure: ...

Enhance Material-UI's SwipeableDrawer by incorporating a clickable handle

Is there a way to include a clickable handle in a material ui SwipeableDrawer? Something similar to what's shown on Google Maps here: Google Maps button.css position: absolute; top: 100px; left: -50px; width: 50px; height: 100px; z-index: 10000; // ...

Invoking a function in an Angular 4 component using a <td> element

Take a look at this block of code: personListComponent.html <tr *ngFor="let person of personService.getPersons()"> <td (onShow)="getCountry(person)">{{person.name}}</td> <td>{{country}} </tr personListComponent.ts ...

Modify the class of a div element based on the user's login status

Apologies for the repeat question, but I need some guidance. How can I apply CSS styling to a div only if the user is logged in? I currently have the following PHP code in place: if (isset($_SESSION['username'])) { include("/view/leftmenu.php" ...

What is the best way to add a gradient color to the bottom of your content?

Seeking assistance in replicating the unique UI design featured in the image below, taken from a course description section on udemy.com. The goal is to create a gradient effect on specific parts of the content, similar to what is shown in the image. http ...

Side navigation bar expands to the right with Bootstrap

I've been attempting to horizontally expand the links in the side navbar, but I'm struggling to achieve the desired layout despite following Bootstrap 4 tutorials. Below is my code snippet. <li class="active dropright"> ...

Incorporating text onto an HTML webpage

Context: My program reads a file and displays it on an HTML page. The code below utilizes regex to extract errors from the file. Instead of using console.log for debugging, is there a way to display the results on the HTML page? When attempting: document ...

Ways to determine if content is visible within a div

My website contains a script that brings in content from an ad network and displays it within a div element. Unfortunately, this particular ad network only fills ads 80% of the time, leaving the remaining 20% of the time without any ads to display. This la ...

Is it possible to adjust the size of my image based on the browser's zoom level?

While working on my website, I noticed that when I zoom out on my browser, everything resizes except for the image. The image remains the same size regardless of whether the browser is set at 100% or 50%. Is there a way to code the image so that it resizes ...

My JavaScript functions are not compliant with the HTML5 required tag

I am currently developing input fields using javascript/jQuery, but I am facing an issue with the required attribute not functioning as expected. The form keeps submitting without displaying any message about the unfilled input field. I also use Bootstrap ...

Having difficulty removing padding from material-ui TabPane

Here is my TabPane: https://i.stack.imgur.com/Ihxmn.png I've been attempting to eliminate the padding. Some suggestions on SO led me to try this: <TabPanel value={value} index={i} classes={{ "& .MuiBox-root" ...

Having trouble getting the equirectangular panorama example from Three.js to work on your device even though WebGL is supported?

After examining the WebGL equirectangular panorama example, it performs well on both desktop and mobile devices (such as the Samsung S4 Android 4.4.2) using the latest version of mobile Chrome. However, when tested on the Samsung tablet SM-T230 also runni ...