What is causing the content on my webpage to not fill the entire width of the page?

I've encountered an issue with the content on one of my pages not expanding to the full width of the page. Despite placing everything inside a container and setting the max-width of the container to 1500px, the content still doesn't extend all the way across the page.

Below is the code for the page:

<body>
    <div id="wrapper">
    <div id="banner-wrapper">
    <!---Company Header-->
        <header>
      <div id="header">
                <h1 class="main_header">Bracelets</h1>
                <audio autoplay="autoplay" loop="loop" id="background-music">
                    <source src="music/Albinoni-adagio-in-g-minor-acoustic-guitar.mp3" type="audio/mpeg">
                    <source src="music/Albinoni-adagio-in-g-minor-acoustic-guitar.wav" type="audio/wav">
                </audio>
        </div>
        </header>
<!---end of Company Header-->
        <br>
    <?php include_once("templates/template_navigation.php"); ?>
        <br>
        <br>
        <br>
<!--Start Comment page Body Content-->
<div id="body-content">
    <div class="bracelet_body">
        <?php
                for ($i=0; $i <sizeof($item_number) ; $i++) {
        ?>
        <table width="100%" border="2" cellspacing="0" cellpadding="15">
  <tr>
    <td width="25%" valign="top">
        <img src="pictures/inventory/<?php echo $item_number[$i]; ?>.jpg" width="180" height="188" alt="<?php echo $item_number[$i]; ?>" /><br />
        <a href="pictures/inventory/<?php echo $item_number[$i]; ?>.jpg">View Full Size Image</a></td>
    <td width="75%" valign="top">
        <h3 class="Item"><?php echo $item_number[$i]; ?></h3>
      <p>Price: <?php echo "$".$price[$i]; ?><br />
        <br />
        Description: <?php echo $desc[$i]; ?>
<br />
         Category: <?php echo $category[$i]; ?>
        </p>
      <form  id="form1" name="form1" method="post" action="cart.php">
        <input type="hidden" name="pid" id="pid" value="<?php echo $item_number[$i]; ?>" />
        <input class="button" type="submit" name="button" id="button" value="Add to Shopping Cart" />
      </form>
      </td>
    </tr>

</table>
<?php
       }
 ?>
    </div>
</div>
<!--end of Comment body -->
<footer>
        <div class="icon-text">
            <div class="icon-text-text">
                <ul class="footer-nav">
                    <li><a href="tearms.php">Tearms and Conditions</a></li>
                    <li><a href="shipping_info.php">Shipping Information</a></li>
                </ul>
            </div>
        </div>
        <div class="icon-text-icon">
            <p class="email_text">Follow Me On</p>
            <div class="social-icon">
                <a href="#">
                <img class="social-icon" src="icons/facebook.png" alt="Facebook" height="45" width="45"></a>
            </div>
        </div>
</footer>
<footer class="second">
        <p>&copy; All Rights Reserved</p>
</footer>
</body>

Despite setting the CSS for the wrapper to have a max-width of 1500px and min-width as well, I can't seem to figure out why it's not extending all the way to the right as intended. Any suggestions?

#wrapper {
    max-width: 1500px;
    min-width: 1500px;
}

Answer №1

It's unclear to me what you're inquiring about.

However, if you desire the container to stretch across the entire width of the page, simply set the width of the container to 100% and eliminate any padding or margins from the body.

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

Troubleshooting problem with Z-Index conflict in Flash animation

I am facing an issue with two HTML divs - one containing a flash movie and the other simple text. I want to place the textual div on top of the flash movie div, but no matter how I set their positions in CSS or adjust their Z-Index values, the text keeps ...

The JQuery script is not producing any results

After integrating a script into my website template, it is not functioning as expected. I suspect there may be a conflict with JavaScript, but upon inspecting with firebug, I am unable to identify any abnormalities. Here is the link for reference: Link ...

The navigation elements are misaligned when viewed on a mobile device

The layout of my navigation items is problematic on mobile view as they are taking up two lines. The search bar, hamburger menu, and logo are not aligned on a single line which is confusing for users. Here is an example of the issue in mobile view: https ...

Having trouble aligning items within columns using Bootstrap 4?

Even after researching and attempting solutions from previous questions, I still have not been able to achieve the desired outcome. What is the best way to align items inside columns? How can I adjust image size to perfectly fit the column width? <sec ...

Is it possible for me to select from H1-H6 tags depending on the font size?

Back in the day, I was coding before CSS even existed and we relied solely on HTML for page aesthetics. This background info will help explain my question. Is it incorrect to use different heading tags (h1 to h6) based on font size rather than significanc ...

An error occurred when attempting to run the command npm run compile:sass, displaying the message: npm ERR! missing script:

Everything seems to be in place with the sass folders and files, so what could be the issue? I have my package.json file set up correctly with the following code: { "name": "starter", "version": "1.0.0", " ...

Looking to showcase XML data from a post request in a visually appealing HTML format?

Currently, I am in the process of executing a function that retrieves an XML document from another website. After successfully displaying the returned XML within #document using console.log, I encounter an issue when trying to parse the XML and add it onto ...

What steps should I take to modify my navigation menu to display 'Logout' once a user is logged in?

I'm currently working on a small project to create a basic website and I am struggling with implementing a feature in PHP that changes the menu navbar to "Logout" once the user has successfully signed in. Below, you can find the navbar code as well a ...

Which file is the optimal placement for the Bootstrap directory: 'header.php' or 'function.php'?

Having dabbled in WordPress Theme templates for a while, I've decided to try my hand at creating a theme from scratch. After uploading the Bootstrap features onto my server, I'm pondering whether it's better to call the Bootstrap.css files ...

The CSS import for fonts is causing no change in the font appearance

Hello there, I've just begun working on some CSS projects and I'm facing an issue with my font import. Despite writing the code below for the font import, I'm not seeing any change in the font: @font-face { font-family:gamefont; src:url(raw ...

Using jQuery to create a script that will transition random images simultaneously within a div

I am currently working on a JavaScript script that will animate 10 images flying into a div, appearing side by side. The goal is to have each image fly in randomly with a unique transition. At the moment, my script is almost complete as I've successf ...

Fill input text fields with values based on dropdown selection and start with 2 input fields pre-filled

Initially, the issue is that there are 2 input text fields displayed. Depending on the selection from a drop-down menu ranging from 2 to 6, additional input fields should be added or removed. Here's my code: function addElements(selectElement) { va ...

Step-by-step guide on crafting your own twig with customizable color options using a colorpicker

I attempted to implement a color picker for my HTML form in Symfony, and it functioned flawlessly. However, when I tried using Twig for my form, I encountered difficulties meeting my expectations. I explored the GenemuFormBundle at https://github.com/gen ...

Obtain data from jQuery Data row

I am currently working on an asp.net page where I have implemented jQuery datatables. Below is a snippet of the code: <% foreach (SubmissionSearchResult result in SearchResults) {%> <tr data-name='<%=result.ID %>'> For each r ...

Guide on importing a custom CSS file from Syncfusion Theme Studio into an Angular project

Is there a way to incorporate custom scss files downloaded from Syncfusion Theme Studio into Angular CLI without adding the URL to the styles section in angular.json? Can we directly import it into styles.scss instead? I attempted to do so by including th ...

Having trouble getting my <a> tags to function properly on my GitHub webpage, even though they work perfectly fine on Codepen

I recently completed a random quote generator webpage project as part of my freecodecamp curriculum. I decided to upload the files to GitHub in order to host them as standalone webpages. While the page works perfectly on CodePen, I encountered an issue wit ...

Encountered an error when attempting to use 'appendChild' on 'Node': the first parameter is not the correct type. It was able to work with some elements, but not with others

I'm currently working on a script that utilizes fetch to retrieve an external HTML file. The goal is to perform some operations to create two HTMLCollections and then iterate over them to display a div containing one element from each collection. Here ...

Change a variable on the fly without needing to reload the page

<!DOCTYPE html> <!-- To update your slot machine images without refreshing the page, you can use JavaScript to dynamically change the images on click. Here's a simple example using JavaScript: <html> <head> <title& ...

Enhancing an image's background with the :before CSS3 pseudo-selector to create a dark

My aim is to enhance the jumbotron background image by adding a dark overlay with 50% opacity using CSS techniques. I attempted to utilize the :before CSS selector to insert a dark rectangle in front of the jumbotron, which worked well for the standard ju ...

Ways to perfectly align three images side by side using CSS

I am trying to align 3 pictures horizontally, but they keep ending up on separate lines. Here is the code I have been using: HTML <section class="features"> <figure> <img src="....jpg" alt="..."> ...