Creating a Bootstrap grid system for multiple divs with offset styling

Looking to design an HTML page layout with a sidebar menu and a fixed KPI metrics div in the first row. Want the KPI metrics div to stay fixed when scrolling through tables below. Also, seeking guidance on aligning the KPI metrics div and the table div to the right side of the page. Considered using the CSS property position: fixed for the KPI div, but unsure about aligning the table div on the right side.

<!DOCTYPE html>
<html lang="en>
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container-fluid">

  <p>KPI DIV TO BE FIXED</p>
  <div class="row row-no-gutters">
    <div class="col-sm-4" style="background-color:lavender;">SIDEBAR</div>
    <div class="col-sm-8" style="background-color:lavenderblush;">KPI DIV</div>
  </div>
  <br>
  <p>TABLE DIV BELOW KPI DIV</p>
  <div class="row">

    <div class=" offset-md-4 col-md-8" style="background-color:lavenderblush;">TABLE DIV</div>
  </div>
</div>

</body>
</html>

Answer №1

Starting point for your project can be found here: https://codepen.io/panchroma/pen/zXBVRp

It's not entirely clear where you should proceed from here. Get in touch if you require further assistance.

The HTML code is almost identical to what you originally shared, with minor changes made to classes on lines 21 and 23.

<div class="row row-no-gutters">

<div class=" col-md-offset-4 col-md-8" style="background-color:lavenderblush;">TABLE DIV</div>

Wishing you the best of luck!

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

Having trouble with the alignment of the product grid on Woocommerce with the Wootique theme?

Hey there, I've been facing an issue with the woocommerce product display grid layout. The items keep getting misaligned, with one on a line and the others right next to each other. I attempted to fix it by adding some custom CSS code: .woocommerce ...

Display a pop-up directly below the specific row in the table

I am working on creating a table where clicking on a row will trigger a popup window to appear right below that specific row. Currently, the popup is displaying under the entire table instead of beneath the clicked row. How can I adjust my Angular and Bo ...

Tips for formatting dates in Angular 6

I am currently working on a function that displays real-time dates based on user input. Currently, when the user enters the input, it is displayed in the front end as follows: 28.10.2018 10:09 However, I would like the date to change dynamically based on ...

What is the best way to achieve this effect with CSS?

Is there a way to create this design with CSS? I experimented with applying border CSS and rotating the DIV, but couldn't quite achieve the desired result. Here is an image for reference: https://i.stack.imgur.com/yW6wK.png ...

Transfer data from a Django template populated with items from a forloop using Ajax to a Django view

Struggling to implement a click and populate div with ajax in my django e-commerce app. The function involves clicking on a category in the men's page which then populates another div. gender.html {%for cate in cat%} <a href="javascript:getcat()" ...

Is it better to define the SVG `viewbox` once in a `symbol`, or each time an SVG is `used`?

Based on my research, some tutorials suggest that when inserting an SVG <symbol> with <use>, the viewBox property only needs to be defined once - in the <symbol> tag. While this method seems to work fine, it results in the contents of th ...

Selenium is unable to interact with hyperlink buttons in Python

I am currently working on a project where an automated program logs into an account and navigates through various webpages. My current struggle lies in the inability to click on any hyperlink buttons on a specific webpage to progress to the next page. I h ...

Struggling to understand why my React Component is failing to render properly

Could there be an issue with how I imported react or am I simply overlooking something small? Any feedback would be greatly appreciated. As a beginner in programming, I may be missing a simple solution that I'm not experienced enough to identify. Than ...

Is using transform scale in CSS to scale SVG sprites a valid method of scaling?

I have been using an SVG sprite as a CSS background image in this manner: .icon-arrow-down-dims { background: url("../sprite/css-svg-sprite.svg") no-repeat; background-position: 16.666666666666668% 0; width: 32px; height: 32px; display: inline-b ...

Transform an existing Material UI application into a mobile-friendly version with responsive design

Building a web app using React and Material UI has presented some challenges, particularly with mobile responsiveness. Here are my questions: Is there a way to make margins responsive? For instance, currently I am setting margin-left like this: marginLe ...

Angular: Streamlining Pagination using Bootstrap Styles

I need help with adding pagination to my table. I've been following the instructions on this link: Pagination Tutorial However, I encountered an error while trying to use map(product,i). The specific error message is: Property 'map' does ...

Is it possible to set the input form to be read-only?

I need to create a "read-only" version of all my forms which contain multiple <input type="text"> fields. Instead of recoding each field individually, I'm looking for a more efficient solution. A suggestion was made to use the following: <xs ...

navigation bar: retain link hover state even after displaying sub-menu

My navigation bar has submenus with background images in .png format. Only 3 links in my navbar have these submenus. The issue I am facing is that when the menu link is in a hover state and the submenu is being hovered over, the nav link loses its hover st ...

Is it possible to execute a server-side click on a div element?

I have a div with an image and name inside. How can I make this div trigger a server-side click event without changing its structure? Here is my code: <div class="tutorial" style="margin-left:5px;"> TUTORIAL<div class="firstico" style=" ...

Executing Javascript in a Bootstrap 4 modal using Rails

I am working on a Rails 5.1 application where I'm implementing a patient record creation functionality using Ajax within a form using coffeescript/JS. The code I have been using for this task works seamlessly: _form.html.erb <div class="modal fad ...

Navigating through Frames using Selenium in C#

I am facing an issue with using Selenium on this site. The elements I need to interact with are within a 'frame' that is inside a 'frameset'. Here is the relevant HTML snippet: <frameset rows="0%, 95%" frameborder="0" frameSpacing=" ...

Achieve visibility of sibling <div> without the need for JavaScript by utilizing the :checked CSS pseudo class

I've been attempting to implement the technique demonstrated in this article, but I'm struggling to achieve the desired effect of revealing new elements after a radio button is selected. .reveal-if-active { opacity: 0; max-height: 0; ove ...

Verifying file types with HTML5 drag and drop feature

Is it possible to change the drop zone's background color to green or red based on whether the dragged payload contains supported file types (JPEG)? Do Gecko and Webkit browsers have the ability to determine the file type of drag and drop files? ...

Connect the CSS active state to a JavaScript event

.el:active{ background:red; } Is there a way to associate the above CSS active state with a JavaScript event, like this: $('.el').on('active', function(){ img.show(); }); I want the image to remain visible when el is presse ...

SVG text tags displaying Russian characters incorrectly

Upon visiting my website, I noticed that the Russian text within the SVG is not displaying correctly in certain browsers. Here is the code snippet causing the issue: <g> <rect id="XMLID_2_" x="409.1" y="102.3" transform="matrix(0.7071 -0.7071 ...