What is the best way to align these five column boxes to be in line with the Bootstrap button tabs located above them?

I have created a responsive tab and pill list using a combination of CSS and Bootstrap 4. However, I am facing an issue where the boxes in col-2 do not align with the tabs above them. I want the edges of the col-2 boxes to align perfectly with the edges of the tabs. How can I achieve this alignment? Thank you for your help.

Here is a link to the screenshot: https://i.sstatic.net/EIfDk.jpg

Should I adjust the width of the boxes? They currently have a class of col-2. Thank you in advance for your guidance.


    <div class="tab-content">
      <!-- Tab content structure goes here -->
    </div>

.row .col-2 {
    width: 200% !important;
    padding: 0px !important;
}

.row .col-2 .box {
    width: 100%;
}

div.maincontainer.adsl {
    margin-top: 0px !important;
}

div.maincontainer.adsl .col {
    font-size: 0.6rem;
}

div.row .col-2 {
    margin: 0 auto;
}
#adsl {
    margin-left: -1px;
}

div.row#adslrow {
    margin-left: -35px !important;
} 

div#adsl.tab-pane {
   margin: 0 auto;
}

.adsl ul.netfeatures{
    list-style: none !important;
}

Answer №1

I have set up a simple framework that aligns with your specifications, consisting of 5 columns and 5 tabs.

To achieve equal width tabs, use the .nav-justified class. For creating the column layout, simply utilize the .col class without specifying the number of columns.

Check out the demo here

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

Remove any unnecessary space from the SVG file while maintaining its original dimensions

Is there a way to trim excess space surrounding the svg while keeping its original size intact? <svg fill="#807c8c" width="45" height="45" version="1.1" viewBox="0 0 700 700" xmlns="http://www.w3.org/2000/svg"> <path style="str ...

Tips for creating a responsive iframe without relying on aspect ratio assumptions

Is there a way to create a responsive iframe without relying on a fixed aspect ratio? The width and height of the content are unknown until rendering. Keep in mind, using Javascript is an option. For instance: <div id="iframe-container"> <i ...

hidden behind the frame is a drop-down menu

I am currently working on a website that uses frames. The topFrame.php contains a menu with drop-down submenus, while the main frame displays the website content. However, I am encountering an issue where the submenu in the topFrame is getting hidden beh ...

Padding issue observed at the lower part of the table cell in white color

Take a look at this JSFiddle: http://jsfiddle.net/nMbb4/1/ Here is the HTML code: <table> <tr> <td> 1 </td> </tr> <tr> <td> <div></div> ...

php reload page with included content

I am currently in the process of building a website using php, jquery, Sass, Bootstrap, and more. The setup I have in place involves one main index page that contains all the necessary includes for the header, CSS files, and JavaScript files. Different pa ...

What is the best way to position an image in the center of the screen with uniform margins around it?

Could someone please help me figure this out? I've been attempting for some time but can't seem to make it work with the bottom margin. This website in the fashion industry showcases what I'm trying to achieve: It's designed to be resp ...

How can you use CSS animations to animate two images in a way that hides one while showing the other?

click here for the image link visit this webpage for the link I need I am looking to add an animated section to my website. The inspiration comes from the webpage linked above, where images slide down one after another in a seamless manner. I attempted t ...

Anti-aliasing with @font-face in Internet Explorer versions 7 through 9

Having some trouble getting @font-face to display correctly in IE, and I haven't found a solution yet. I've looked into this resource: but unfortunately it didn't work on my Windows 7 IE. Does anyone have a better suggestion? ...

Transform the size and convert an object from a picture into text based on the user's scrolling

I've been intrigued by the scrolling effects used on websites like Google SketchUp and Google Plus. It's fascinating how elements can transform as you scroll down the page. For example, on Google SketchUp's site, the banner starts off integr ...

The screen should smoothly slide upwards when the keyboard pops up, ensuring the footer remains und

Hello! I am currently in the process of developing a mobile app using HTML, CSS, Bootstrap, and JavaScript. I have encountered a slight issue where the keyboard does not automatically pop up and move the screen up when the user taps on the textbox in the f ...

Using Javascript to dynamically retrieve accordion content from a dynamically generated ID

I am currently working on developing a more intricate accordion feature. The accordion will consist of 4 buttons (section 0-3) with unique content (lorem ipsum 0-3). Clicking on "section 0" should reveal "lorem ipsum 0", while clicking on "section 1" shoul ...

Experiencing a horizontal scroll while shifting the elements despite no visible overflow

While working on the contact section of my website, I encountered an issue. Every time I adjust the position of the textboxes and labels by 15em within the wrapper, a horizontal scroll appears. How can I move these elements without triggering the scroll ba ...

Developing a new WordPress plugin - encountering issues with locating CSS files

I'm having an issue with my wordpress plugin where I am getting a 404 not found error on the css files. Here is the code snippet that's causing the problem (it's in the main php file for the plugin) function callback_for_setting_up_scripts() ...

What is the best way to get padding to work on text that wraps using CSS?

Take a look at this simple example: https://codepen.io/cpcpcpcpcpx/pen/VwZWoyJ Here's what it includes: .wrapper { width: 200px; } h1 { font-size: 32px; font-family: Tahoma, Helvetica, sans-serif; line-height: 50px; } .header-text { ba ...

Error: Dropdown functions correctly in standalone HTML page but fails to work within Angular component

Check out the code snippet below for a simple dropdown implementation: <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.1/c ...

Implementing CSS for preventing text from overlapping with images

I have designed an image that includes some accompanying text, as depicted in the figure below. <span class="productname ">Beautiful Creations</span> <img src="xy.jpg" data-attr="productimg" class="producti ...

Unable to view numbers on iPhone or ios device

I am facing an issue with displaying a phone number in the contact section on my website. The number shows up on desktop but not on my iPhone, even when I resize the screen to be smaller than my phone's display size. This issue has been tested on both ...

Improper Cascading of CSS Styles for JavaFX Label

I have created an FXML class using SceneBuilder, loaded via FXMLLoader with an associated controller. The parent panel of the widget has a style class with a pseudo-class applied to it. Interestingly, while the ToggleButton is styled correctly, the two lab ...

In Chrome, there is a conflict between the screen width when using `position: absolute` and `position: fixed` if there is vertical

I'm in the process of developing a website with a video banner set to fixed positioning in the background, and a div that has absolute positioning covering part of the video on the bottom half. However, I've encountered an issue - when I add this ...

A guide on dynamically adjusting text size based on viewport width and height in React with TailwindCSS

Utilizing React and Tailwind, I am working towards creating two overlapping rectangles with text. The top rectangle's text should be aligned to the left, while the bottom rectangle's text should be aligned to the right. Regardless of window size ...