Challenge with Bootstrap container size, grid row dimensions, and padding

I'm putting together my inaugural bootstrap frontend, and I'm encountering some challenges that have me stumped:

https://i.sstatic.net/az6go.png

The row is stretching to fill the container width, but the maximum column width (12 units) isn't reaching this extent:

https://i.sstatic.net/3vMXm.png

Additionally, why is #content within the container exceeding the padding?

https://i.sstatic.net/vx9ne.png

Any guidance would be highly valued!

I attempted using the container-fluid class, but it seems the row is not achieving the maximum width.

Complete HTML:

<!DOCTYPE html>
<html>
<head>
    <title>Snoo</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">

    <link rel="stylesheet" type="text/css" href="app.css">

</head>
<body>  
    <div class="container">
        <nav class="navbar navbar-expand-lg navbar-light bg-light">
            <a class="navbar-brand" href="#">Snoo!</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">About</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">Reddit!</a>
                    </li>
                </ul>
            </div>
        </nav>
    </div>

    <div class="container"> 
        <div class="row">           
            <div class="col_xl-12">     
                <div id="content">      
                    <h1>Snoo!</h1>
                    <hr>
                    <h3>A chatbot based on a million reddit comments, quite salty!</h3>
                    <button class="btn btn-primary btn-lg">Learn more!</button>
                </div>
            </div>
        </div>
    </div>
</body>

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>

</html>

CSS:

#content {
    text-align: center;
    padding-top: 25%
}

Answer №2

There appears to be a small error, please update the following:

xtra-large-12 should be changed to -> extra-large-12

Answer №3

  1. Try taking out the container in your code to make the row span the full width
  2. You should use col-*-* for your class instead of col_xl-12

This is how the HTML structure should look like:

<div class="row">
  <div class="/* Container or Container-fluid or Col-* */">
  </div>
</div>

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

Ensure that CSS transformation rotation always moves in a clockwise direction without surpassing 360 degrees

As I work on designing a clock, I have implemented a combination of JS and CSS to create a seamless animation for the clock's "hands." This involves converting seconds, minutes, and hours into their corresponding degrees in the analog clock: function ...

Steps to reveal a hidden div when clicking on another div using CSS exclusively

Is it possible to reveal a hidden div when another div is clicked using only CSS? Below is the HTML code: <div id="contentmenu"> <div class="show"> <a class="show"> My Student ...

The table of 100 elements contained within a div does not expand to the width of the div, but

Here is a different layout to consider: <div style="float: left"> content1 </div> <div style="float: left"> <table width="100%"><tr><td>dfsd</td></tr></table> </div> Now, there is an issue where ...

Tips for achieving full width design within a container

Hello everyone, I require some assistance. I am attempting to create a full-width navigation while being constrained by a wrapper div with a fixed width of 900. I am unsure of how to achieve this without creating an additional div like the header. I am see ...

Avoid the ability for individuals to interact with the icon embedded within a button

I'm currently working on a website where users need to interact with a button to delete an "Infraction." The button has a basic bootstrap style and includes an icon for the delete action. <button referencedInfraction="<%= i.infractionID %>" ...

Set a unique color for the background of the button when it is clicked

I am looking to enhance my previous post by adding a background color to the button upon clicking. My attempt with btn[i].style.background = "#000000" did not work as expected. <script> const btns = document.getElementById("container"); const textBt ...

Icon for local system displayed on browser tab

I am currently trying to set a Browser Tab icon for the local system, but it is not working. However, when using an HTTP static icon, it works perfectly. Can someone please help me understand what the issue might be? PAGE 1 : Icon Not Showing <link re ...

Implement a Selection Feature in Angular

Currently, I am working on an application where users can add new rows with the same fields. One of the requirements is to allow users to add an option to a select element. While I have successfully implemented this in jQuery, I am facing challenges integr ...

Problem with CSS in the Internet Explorer 8 browser encountered

While working on a project, I encountered an unexpected design issue on a client's machine that has Internet Explorer 8 installed. Interestingly enough, when testing on my own machine with IE 9 and using F12 to switch to compatibility mode for IE 8/7, ...

Revealing and concealing adjacent elements within a specified class

In an attempt to create a carousel that functions by hiding and showing images when the next and previous buttons are clicked, I have organized my images in a table and assigned the li elements a class of 'li'. There are four images in total, wit ...

Customize MUI Tabs to resemble the design of Bootstrap Nav Tabs

Looking to customize Material UI Tabs to resemble Bootstrap Tabs. Made significant changes, but struggling with removing the border-bottom on the activeTab. In Bootstrap, they use marginBottom: -1px on the active tab, but it doesn't work for me. Any s ...

Motion graphics following the completion of a form input

In my HTML, I've created a div container with a form field: <div class="flex_item" id="b_one"> <form id="f_one"> <input id="i_one" type="text"> </form> </div> I'm attempting to change the backgroun ...

Adjust the dropdown width on a bootstrap form to match the size of the textbox

In order to maintain a combined width of 450px, I have two textboxes. One textbox includes a dropdown menu while the other does not. Both textboxes are part of an input group. The dropdown can switch between either textbox at any time. I need the width ...

What is the best method for ensuring three inside divs have equal heights?

I am working with a container div#content that holds three inner divs. I want to ensure that all three divs have the same height, but also expand based on their content. Here is an example of what I have tried: <!doctype html public "-//w3c//dtd html 4 ...

Having Trouble Changing CSS with Rails Link_to CSS ID

While following the ruby on rails guide, I came across a specific way to write link_to's with a css id: <%= link_to "About", about_path, id: "third" %> I also attempted: <%= link_to ("About", :id => "third"), about_path %> Although ...

Tips on applying a border to an HTML tr

Imagine I have created a table like this: 1 Chailie 23 Joker Bass 2 Chailie 23 Joker Bass 3 Chailie 23 Joker Bass 4 Chailie 23 Joker Bass 5 Chailie 23 Joker Bass 6 Chailie 23 Joker Bass Now I wa ...

Conceal a portion of the navigation menu while viewing on mobile devices and ensure proper functioning of the mobile stylesheets

I'm facing an issue with my website's navigation bar. It has five sections on desktop, but I need only four visible on mobile devices. However, I can't seem to get my mobile style sheets to work properly. Specifically, I am struggling to hid ...

Manipulate classes for buttons in a React component by adding or removing them

I'm attempting to create two buttons that will toggle their class when clicked. When button one is clicked, it should add the "active" class to itself and remove the "active" class from the sibling button. I've made some progress, but I'm e ...

Placing a dropdown menu on top of an image

I currently have a slightly rotated menu bar with two buttons as an example: https://i.stack.imgur.com/0sI2P.jpg Due to the rotation, normal HTML handling is not feasible. I am considering using a <map> element to create hyperlinks over the menu it ...

Tips for initiating a scrollable (overflow-y: scroll) div in the middle rather than the top while scrolling

I am working on a code where I have a scrollable div with overflow-y: scroll. However, the default scrolling starts at the top of my div when I want it to start in the middle. Can anyone suggest a solution for this issue? export function Portfolio({ chi ...