The functionality of the footer grid layout in Bootstrap seems to be malfunctioning

I've been struggling to create a footer grid using the Bootstrap layout.

Any help would be greatly appreciated.

Here's an image of what I'm trying to achieve:

I've attempted multiple times but can't seem to make it work

<!--- top row----->
<div class="row">
<div class="border col-xs-3">box on the right #1</div>
<div class="border col-xs-3">box on the right #2</div>
<div class="border col-xs-3">box on the right #3</div>
<div class="border col-xs-6">
<div class="border col-xs-3">small box to the left under box 3</div>
div class="border col-xs-3">small box to the right under box 3</div>
</div>
<div class="border col-xs-3">box on the left #4</div>
</div>
<!--bottom row--->
<div class="row">
<div class="border col-xs-3">box on the left</div>
<div class="border col-xs-8">place for sliding banner</div>
<div class="border col-xs-3">small box on the bottom right}</div>
</div> 

Answer №1

When using Bootstrap, each row is divided into 12 columns. The col-xs-* class is used for phones with a screen size of less than 768px. If you want to learn more about how the grid system in Bootstrap works, check out this tutorial or this one at Scotch.io. For a demo mockup example based on your code, you can view it live on LiveOnFiddle. Remember that this is just a mockup and there are plenty of CSS tricks you can use to customize your layout using media queries. To get you started, here is an example of the CSS code you might use:

html,body{
  max-width:100%;
}
.row {
  margin: 5px
}
.border {
  border: 1px solid black;
  height: 100px;
  line-height: 1;
}
.top-box {
  height: 50px;
}
.small {
  width: 36%;
  height: 45px;
  display: inline-block;
  text-align: center;
  line-height: 1;
  margin-top: 26px;
}
.slide-banner {
  height: 50px;
}
.small-right {
  width: 20%;
  height: 50px;
  margin-top: 5px;
  float: right;
}

@media (max-width:535px) {
  .small {
    margin-top: 15px;
  }
}
<head>
   <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 
</head>
<div class="row">
  <div class="border col-xs-3">box on the right #1</div>
  <div class="border col-xs-3">box on the right #2</div>
  <div class="border top-box col-xs-3">
    <p>
      box on the right #3
    </p>

    <span class="border small ">small under box3 </span>
    <span class="border small ">small under box3</span>
  </div>
  <div class="border col-xs-3">box on the left #4</div>
</div>
<!--bottom row--->
<div class="row">
  <div class="border col-xs-3">box on the left</div>
  <div class="border slide-banner col-xs-8 col-xs-offset-1">place for sliding banner</div>
  <span class="border small-right">small box bottom right</span>
</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

Activate SVG graphics upon entering the window (scroll)

Can anyone assist me with a challenging issue? I have numerous SVG graphics on certain pages of my website that start playing when the page loads. However, since many of them are located below the fold, I would like them to only begin playing (and play onc ...

core.js:15723 ERROR TypeError: Unable to access the 'OBJECT' property because it is undefined

Whenever I attempt to run this function, I encounter an issue. My goal is to retrieve the latitude and longitude of an address from Google's API. This error message pops up: core.js:15723 ERROR TypeError: Cannot read property 'geometry' of ...

Rendering Django models in HTML may present difficulties

I am having an issue with rendering some of the models I've created in my template. Some are working fine when I try to use the same method to create other models, but they don't render properly. I have tried running manage.py runserver, as well ...

What is the best way to align bootstrap col-md-4 and col-md-5 in the center of a webpage?

I am facing an issue with my two bootstrap items, one col-md-5 and the other col-md-4. Despite trying to center them in the middle of the page, they are currently positioned with col-md-4 on the left side and col-md-5 in the middle. Does anyone have a solu ...

Is it possible to modify the button icon on hover by utilizing chakra-ui and vanilla-extract?

My stack includes nextjs13, chakra-ui, and vanilla-extract Seeking guidance on how to update both icon and text within a button upon hover, utilizing chakra-ui and vanilla-extract. The current setup of my button is as follows: <Button > <svg wi ...

Is there a way to ensure that the fixed modal remains at the forefront and that its top stays in view even as the user scrolls?

Can you assist me in simplifying this code? import { LoginProps } from '@/layouts/layout.props'; import { Box, Button, Divider, Flex, FormControl, FormLabel, Heading, HStack, IconButton, Input, Link, Stack, Text, } from ...

What are some ways to employ ul and li elements to create columns that are consistently aligned, even when some columns may be empty?

In my HTML document, I have multiple sections with unordered lists of items. In a specific ul section, the list looks like this: <ul> <li>item 1</li> <li>item 2</li> <li>ck-item 2</li> <li ...

Unable to access .php file on new server using JQUERY AJAX .get

After migrating my website to a new server, I encountered an issue where all the $().get("whatever.php") calls were failing. Previously, everything was functioning properly but now none of the requests are even reaching the php script. For instance: inde ...

Automatically adjust sizes with div elements

How can I automatically resize this iframe within a div? My current method is not effective. <iframe src="http://www.gamepuma.com/external.html?http://data.gamepuma.com/games/06/crash-bandicoot.swf" width="600" height="400" frameborder="0" margin ...

Enhancing Google Custom Search Engine with Bootstrap3 and CSS3 styling

I'm looking for guidance on how to customize the appearance of a Google Custom Searchbar on my website. Is it feasible to style it using CSS3 and Bootstrap 3 like the example in the image below? Any assistance is greatly appreciated. ...

Unable to retrieve data from Flask for AJAX request

When making an AJAX call to a Flask function to retrieve data using a token, the code looks like this: @app.route("/questgen/results", methods = ['POST', 'GET']) def fetch_results(): token = request.form.get('token&a ...

Can you explain the distinction between using a period in a class selector and not using one?

Could someone please clarify the meaning of the code snippet below? <div class="cls1 cls2">abcd <div class="cls2"> adfffff </div> </div> .cls1 { background-color: yellow; } /*sample1 .cls1.cls2 { color: red; } */ /* ...

Using the ng-class directive to dynamically set classes based on the value returned from

I am facing an issue with setting the icon style based on a value returned from the controller. The console log confirms that the value is triggered correctly, but it appears that there is a problem with the Ng-class expression. Any assistance on this matt ...

The timing of the RequestAnimationFrame function varies based on the dimensions of my canvas

In my application, I have a canvas that dynamically adjusts its CSS size based on the window size. The main gameplay loop in my code looks like this: run = function(){ console.log(timerDiff(frameTime)); game.inputManage(); game.logics(); ...

Filling an HTML template with an $http response in VueJS

After learning about VueJs, I decided to embark on a small project - a nutrition app where food recommendations are made based on specific nutrients. Below is the JavaScript code snippet: recommendFood: function() { this.recs = {}; ...

Update the CSS classes exclusively for the specified ID

Attempting to modify and override certain classes within the complex control (dxList) of DevExtreme has been successful thus far. .dx-loadpanel-content { transform: translate(0px, 0px) !important; margin: auto !important; left: 0px !important; ...

What is the best way to update inventory availability on Shopify following adjustments to product variations?

While working on my Shopify store, I managed to find a code that displays the available quantities in stock with a visually appealing effect on the product page. However, I noticed that this code doesn't refresh when selecting different variants of th ...

How do I center text in a table header and align it to the right with its siblings in HTML?

When working on my projects, I often come across a design challenge. I need to align cell text in the center of the header and then right-align it with the data above and below, all within a bordered table. The cells in the image below are spread across di ...

Visual elements failing to load in canvas due to fs/nodejs integration

I've been working with nodesjs and fs to set up a server that can render an HTML page. The HTML page includes a script written in JavaScript to create a canvas, load an image, and draw the image on the canvas. I've run into an issue where when I ...

When the page reloads, the JavaScript input field is emptied

I work with VB ASP.net and SQL as the backend. I have a calendar for selecting dates on my webpage using JavaScript. However, when the page reloads, I lose the selected date value. I need to retain the date until I click the save button. Here is the textbo ...