Employing Bootstrap, incorporate a vertical divider in the center to split three icons on the left and three icons on the right, all while ensuring the design remains responsive

I have been struggling with a layout issue for the past couple of days and I am in need of assistance from someone who can help me. Unfortunately, I am unable to upload an image here as I am new and do not yet have enough reputation points.

The Layout Structure:

Section 1
First row: Centered heading Second row: 6 icons spread out across the width of the page, each with a short description below

Section 2
First row: Two headings separated by a white vertical line in the middle of the page Second row: 6 icons spread out across the width of the page, divided into 3 for each heading with a vertical line separating them

I was able to get the first section working using CSS classes like container-fluid, row, col-sm-2 in Twitter-Bootstrap. However, I am facing difficulties implementing the border-right white line and dividing the icons into two sections in the second row.

The code snippet used for the first section is provided below:

<div class="container-fluid">
    <h5 class="text-center">HEADER 1</h5>
    <ul class="row">
      <li class="col-xs-4 col-sm-2">
        <img src="img/1.png" alt="icon1">
        <p class="text-center">2-word description</p>
      </li>

      ...

    </ul>
    <hr> 
  </div><!-- /.container-fluid -->

I am now seeking help on how to include a white vertical line between the two headers and split the icons accordingly in the second section.

The code snippet for the second section is also included below:

<div class="section2">
    <div class="left container-fluid">
    
        ...
     
    </div><!-- /.left .container-fluid -->

    <div class="right container-fluid">
       
        ...

    </div><!-- /.right .container-fluid -->
  </div><!-- /.section2 -->

Your assistance in resolving this issue would be highly appreciated!

Thank you!

New Question:

Hello! I have another query that I need help with. While working on @mediaqueries and resizing the screen, I noticed that the icons and their descriptions are not perfectly centered. The descriptions appear slightly to the right of the respective icons. I have tried using text-center class in Bootstrap and applying margin: 0 auto in CSS without success. Can you guide me in identifying what might be causing this misalignment?

I appreciate your help in advance!

Answer №1

Before proceeding, think of .section2 as a row, with two children called header1 and header2. Add class="row" to this div and apply class="col-xs-12 col-sm-6" to each header block.

Now, consider each header block as an individual row, consisting of 3 images with descriptions. Repeat the same steps as before.

The use of .container-fluid, .left, and .right is no longer necessary because the parent .row and its children's .col-* classes will take care of these for you.

Update: I apologize for not addressing the issue of the blank space in the middle. This is caused by the default styling of <ul>, but can be fixed by adding ul { padding-left: 0;}.

For reference, check out this example fiddle.

Answer №2

Divide your second segment into two primary rows, each of which includes additional rows for the titles and corresponding symbols. Apply a border-right to the first row.

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

Ensuring complete height and width with no scrollbar in a Material UI React application

I'm attempting to create a page that fills the entire height of the screen without adding an undesirable scrollbar. When I say 100% height, I mean it should just fit the size of the screen. Here is a demonstration of the issue. The yellow highlighted ...

Singling out a particular navigation tab

When attempting to link specific table IDs so that the corresponding tab is active when opened (i.e. www.gohome.com/html#profile), I am facing an issue where the active tab remains unchanged. Even after specifically calling out tab IDs, there seems to be n ...

Issues with jKit Pagination (Controlling Size by Height)

I'm currently utilizing the jkit paginate feature to limit the number of items by height, with the setting at 910 pixels. Everything works fine when there is enough content to exceed this limit and create a second page. However, if the content falls ...

Scaling Images using HTML and CSS

Hey there, I'm currently learning web development and running into a bit of trouble with creating responsive images. Can anyone give me some guidance on what changes I should make in the code below? Here's the HTML code: <div class="caro ...

The radio button becomes unchecked when moving to the next fieldset

While developing a dynamic page using PHP and Laravel, I encountered a situation where I needed to add an additional radio button option to each card. Below is the code snippet for the card in question: <div class="card" style="margin:10p ...

The dropdown menu is dynamically populated based on the selection from another dropdown menu, with options retrieved from

Apologies if this has been addressed previously, but the existing solutions do not seem to work for me. I have 5 dropdowns: Brand, Model, Color, Engine No., and Chassis No. My query pertains to how I can link the dropdown options for Model based on the sel ...

Within the flask framework, I am experiencing an issue where paragraphs are being overwritten. My goal is to find a

Snippet of HTML: <div class="split left" > <div class="centered"> <div class="container"> <p>Hi!</p> </div> <div class="darker"> <p>{{message}}& ...

How to attach an event listener to an input element using Angular

I am looking to add a listener to an input element that will be triggered every time the user changes the input values. The goal is to display the current values chosen by the user. Example HTML template: <div id="idDoseLabel1" class="da ...

Creating an attention-grabbing alert bar positioned above the menu

When I attempted to add this alert bar to my website, I encountered an issue where it was being hidden behind my menu. Some sources suggest that using z-index and position:absolute can resolve this problem by positioning one element above the other, but th ...

Is it possible to use an SVG image as a border with a variable height in CSS

Check out this jsfiddle for my current project's nav setup. I want to center the logo in the middle of the nav with three links centered around it. However, I need the design to be responsive across various screen widths. Any advice on how to achieve ...

Seeking assistance in creating custom tabs for integration with a jQuery tabs plugin

Attempting to navigate the world of CSS as a newbie, I find myself struggling with creating tabs. Our current tab setup can be viewed here, but unfortunately, these tabs are created using an unattractive <table> tag. Below is the code responsible fo ...

Is there a way to condense my child table directly below its parent column?

When attempting to collapse the "child tr" within the "tr" in my code, the collapse is not positioning correctly underneath its parent tr. While it works fine in a JSFiddle, the issue arises when using my editor and live preview. In this scenario, both "ch ...

Tips for preventing overlap between two divs when utilizing position: absolute in CSS

In this CodePen link [https://codepen.io/anon/pen/qvQpaY], there is an issue with overlay between the two divs that have a class name of box-container. The black rectangle is being counted as the overall height by box-container because the red rectangle is ...

The CSS Grid container fails to resize based on the content inside

I am facing an issue with the grid element inside a parent container with display: grid;. The parent container has a maximum size and allows scrolling for the grid if necessary. The problem is that the grid element does not expand to fit its children. Whe ...

Transforming jQuery into vanilla JavaScript in order to create a customized dropdown select functionality

I am struggling with converting jQuery code to pure JavaScript for a custom select element. https://codepen.io/PeterGeller/pen/wksIF After referencing the CodePen example, I attempted to implement it with 3 select elements. const select = document.get ...

The SQL query containing 6 SELECT statements combined with UNION operation resulted in a total of 2 rows being

The table that I'm working with has rows containing four different fields of numbers: people, debris, miles, and bags. As of now, all these fields are set to 0 because there is no data inputted yet. These rows also include two key fields called ' ...

Make sure the division remains fixed even when the window is resized

Having a fixed position and bottom set to 0, I want my div to display at the bottom of the window. The issue arises when the window is resized, causing the div to move up and into other elements. For instance, when opening the console box in Chrome, the f ...

What is the best way to adjust the decimal values in my API calls?

Is there a way to adjust the numerical data returned by the API to display only two decimal places instead of three? For example, if the number is 140.444, I want it to show as 140.44 What changes do I need to make? function fetchData() { fetch(" ...

Identification numbers remain constant

I've been working on a custom CMS blog, specifically designing a page for admin access. My goal is to incorporate pagination into the layout. Currently, the page displays the most recent six posts with IDs ranging from 1 to 6 on the initial view. How ...

Encasing extracted content in <p> tags

On my Wordpress Site, I have extracted images and text separately to use in different sections of my single.php file. Utilizing HTML within the Bootstrap 3 framework: <div class="row"> <div class="col-md-12"> <?php ...