Stacking Bootstrap rows one on top of the other

Currently, I am working on enhancing my frontend CSS skills by experimenting with creating two overlapping Bootstrap rows while maintaining their responsive grid-like behavior. This concept is completely new to me and I'm unsure of how to approach it.

In essence, what I aim to achieve is having two side-by-side columns that repeat based on the content length, along with another row containing a column that overlaps them. This configuration is necessary in order for the middle column (as shown in row 2 of the image) to be visible over all the red columns.

How can this be done while preserving the functionalities of the grid system? I want to ensure that the layout remains responsive throughout the design process.

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

To provide a better understanding of my query, I have created a JS Fiddle. However, the grid isn't behaving as expected in my opinion. Additionally, I believe that utilizing position: absolute may not be ideal for responsive websites.

I hope my question is articulated clearly enough! Thank you in advance for any assistance.

Answer №1

Absolute positioning can be used in this scenario, with the condition that it occupies the full height of the container set to position: relative;

{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  bottom: 0;
  right: 0;
  height: 100%;
}

Check out this link for a live example.

    

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

Revamp the angular design of the mat-tree UI bottom border line issue

Can you help me with changing the direction of the mat tree from right to left? I need to remove the bottom border, please refer to the image https://i.sstatic.net/ecRIO.png here ...

Unable to adjust font size: a technical glitch is preventing the increase, decrease

I'm currently working on implementing a font size adjustment feature on my website, but I'm encountering some difficulties. My goal is to have all elements on the website resize accordingly, including headers, buttons, and modal windows. Below i ...

Utilize a external API to fetch JSON data from the website and showcase it on a webpage in a asynchronous manner

<!DOCTYPE html> <html> <head> <script> src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"> </script> </head> <body> <input type="text" placeholder="Enter Your Zip Code" id="zipCode ...

Creating a unique custom theme for Twitter Bootstrap at 1200px and 980px screen sizes

Using the Twitter Bootstrap CSS framework, I have successfully created a custom navigation bar for desktop devices with a width of 1200 pixels and above. Now, I want to create similar navigation bars for other screen widths such as 980px, tablets, and phon ...

Displaying information in a list format on a webpage using HTML5, pulling the data from a database with

Displaying data in HTML5 listview fetched from a database using JavaScript and JSON. Click on the listview to view details, but unable to show detailed information. It involves changing pages - one page for the listview and another for the details. The co ...

"Encountered a broken image while attempting to send a response with the content-type set as

Within my frontend html, I am looking to include an img element with the source link '/uploads/profilePicture'. In my node/express setup, I need to verify the user's authentication, retrieve their profile picture from the filesystem, and ret ...

Personalized design options for ASP text fields

I have two textboxes (asp:TextBox) close to each other, currently styled like this: https://i.sstatic.net/mcha5.png I want to remove the shadow effect on the top and left edges of the textboxes to apply custom styling. However, using box-shadow has no im ...

Automatically substitute a term with a clickable link

Is there a way to automatically turn every word into a hyperlink? I have specific words that need to be linked. For example, I want Ronaldo (Only for the First Appearance) to link to a certain page. However, my attempted method did not work. <p> Ro ...

Instructions to only input numbers or leave the text field blank

Hey there! I have implemented a directive that allows only numbers in my text field: Here is the HTML code snippet: <form name="filtroForm"> <input id="idMatricula" type="text" class="form-control" ng-model="filtros.Matricula" maxlength="20" ...

jQuery interprets every PHP response as having a status of 0

I've been working on a way for javascript to verify the existence of a user in a MySQL database. My method involves using jQuery to send the user details to a PHP script that will then check the database. The data is successfully sent to the PHP scr ...

"Enhance your website with custom jQuery UI autocomplete styles

I've been working on replicating this example of adding an image to the autocomplete list in jQuery UI, but unfortunately, my version doesn't look quite right. View the Example on the Left vs Mine on the Right The CSS is a bit complex, and the ...

Is there a way to send multiple actions to Node.js via a dropdown list using POST method?

I have encountered an issue where I am trying to include multiple actions in a single form within a dropdown list. However, I am only able to POST one action at a time. admin.html <form action="/start" method="post" id="tableForm"> <select id= ...

Incorporating an SVG with CSS styling from a stylesheet

After exploring various articles and questions on the topic, I am yet to find a definitive solution. I have an external file named icon.svg, and my objective is to utilize it across multiple HTML files with different fill colors and sizes for each instanc ...

Creating a CSS tooltip using only HTML and CSS may present some challenges and not function as intended

I've been attempting to create a basic tooltip using only CSS3 and HTML, but for some reason the transition isn't functioning. Can someone help me identify what I might be doing incorrectly? HTML Structure <p> This paragraph has a too ...

Align objects in two columns with varying heights properly

I'm trying to arrange items in two columns like Wallapop, but this is the best I've come up with so far: https://i.sstatic.net/1yBqJ.png Here is a JSFiddle link where you can edit the code: https://jsfiddle.net/52qdnLcg/ .parent { backgrou ...

Showing a <div> element sandwiched between two elements from different hierarchies

Consider this snippet of HTML code: <div style="background-color: blue"> <div style="color: red"> some content some content some content some content </div> </div> <div id="highlight" style="top: 0px; width: 20 ...

Having trouble importing the name 'RadioChoiceInput' from the 'django.forms.widgets' module during the migration from Django 1.19 to 3.2

Currently, I am facing an issue while upgrading a Django widget.py file from version 1.19 to version 3.2. The error message I encountered is: from django.forms.widgets import RadioSelect, RadioChoiceInput ImportError: cannot import name 'RadioChoiceI ...

How to Condense an Element Using Position: Absolute

https://i.sstatic.net/GMUss.png I'm attempting to create functionality where the "Open Chat" button displays an Absolute positioned div, then hides it when clicked again. I experimented with using the react-collapse component, but encountered issues ...

Creating a stylish CSS button with split colors that run horizontally

Could you please provide some guidance on creating a button design similar to this one? I've made progress with the code shown below, but still need to make adjustments like changing the font. <!DOCTYPE html> <html> <head> <sty ...

cannot access value part of key value pair within ng-repeat

Below is my HTML code with AngularJS integration: <div class="col-xs-1" style="width:130pt;background-color:#474747;border:2px ridge;"> <div class="container-fluid"> <ul class="nav"> <li class="dropdown" style ...