Guide to creating 6 responsive tabs for both Desktop and mobile views using Bootstrap

I am facing issues with the responsiveness of my address map tabs design. The layout looks incorrect after 800px and some gaps are appearing on the left side of the tab. I have tried using media queries but it's still not optimizing well for mobile, tablets, and iPads. Below is the code snippet I have been working with:

$('#bologna-list a').on('click', function(e) {
  e.preventDefault()
  $(this).tab('show')
})
.address {
  width: 141px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div class="col-12 col-lg-9 col-sm-12 col-md-6" style="margin-top: 10px;margin-bottom:14px;">
  <div class="card" style="background-color: lightgoldenrodyellow;">
    <div class="card-header">
      <ul class="nav nav-tabs card-header-tabs" id="bologna-list" role="tablist">
        <li class="nav-item address">
          <a class="nav-link active" href="#description" role="tab" aria-controls="description" aria-selected="true">KalyanNagar</a>
        </li>
        <li class="nav-item address">
          <a id="mm" class="nav-link" href="#history" role="tab" aria-controls="history" aria-selected="false">MS-Palya</a>
        </li>
        ...
      </ul>
    </div>
    <div class="card-body" style="line-height: 1.2;margin-left:26px;margin-top:-46px">
      ...
       <!-- Content for each tab goes here -->
      ...

    </div>
  </div>
</div>

Here is an image showcasing our UI:

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

Answer №1

Are you saying that it doesn't extend to full width? If so, you can simply remove the col-sm-12 col-md-6 col-lg-9.

On another note, I didn't see any gap on the left side; there may be other CSS styles affecting it.

Also worth mentioning, I noticed several missing opening and closing tags like </span>. It's always a good idea to double-check everything before making it live.

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

Circular gradient backdrop

Looking to create a sleek and professional body background for my website that is as attractive as Twitter's. Can you help me achieve the same blue shaded background effect? I'm new to web development and would appreciate any guidance on how to m ...

Node.js: Passing a URL as a Parameter

Snippet: app.get("/:url", function(req,res) { var url = req.params.url; res.send(url); }); Issue: The provided code snippet is not functioning as expected. When attempting to access: http://localhost:3000/https://www.google.com An error messa ...

The CSS media query isn't functioning properly on Safari browser

Currently, I am working on a project using React JS and CSS. In order to make it responsive, I have implemented media queries. However, I have encountered an issue where the media query is not functioning properly in Safari browsers on both phones and PC ...

Encountering a CSS syntax error within CodeSandbox when attempting to input code within brackets

Why is it that I don't see syntax errors in VSCode, but always encounter them in CodeSandbox? What could be causing this discrepancy and how can I resolve it? Any advice would be greatly appreciated. Thank you in advance. Here's an example of th ...

Encountering an Unexpected : Token When Parsing JSON Arrays in AngularJS

I've been searching on various forums for an answer to my AngularJS issue without any luck. I have a simple controller that calls an http service and reads the response data, which is in JSON format with an objects array. However, I'm facing diff ...

Combining information once constructing a complex array structure in JavaScript

My reduce function is successfully building multiple levels of data, but I have encountered an issue. Currently, it organizes the data by employee first, then by date, area, and job. While all the data is displayed correctly at each level, I am now attempt ...

Tips for horizontally aligning a list with sublist using CSS

Is there a way to align a horizontal list with a sublist in HTML and CSS? I want the menu items (Home, News, etc.) to be on one line, with submenu items below them. HTML <body> <div class="menu"> <ul class="menu_l ...

Why is it necessary to type in localhost in the address bar when using node.js and socket.io instead of simply opening the client.html file directly?

I am intrigued by this topic. My suspicion is that it may be related to the temporary file created by socket.io, but I'm struggling to fully understand it... ...

Tips for assigning dynamic #id(*ngFor) and retrieving its value in Angular2

In my HTML file, I have the following code snippet: <tr *ngFor="let package of packages"> <td *ngFor="let coverage of coverages"> <input type="hidden" #dynamicID [value]="coverage.id"> <-- Include an identifier with the vari ...

Using NextJS to render a Link component by creating an element

Struggling to use createElement in NextJS to render a Link, but facing issues. Code: import {createElement} from "react"; import Link from "next/link"; createElement( item.href ? Link : "div", { href: item.hre ...

Ways to expand flexbox to occupy the entire container

I have a scenario where I want two flexboxes in a container to fill the entire height of the container. The left flexbox should display an image that fills its entire space, while the right flexbox contains other content. However, I'm facing difficult ...

When the submit button is clicked, I wish to receive a success notification. After clicking "OK", I should be directed to a new PHP page

When submitting data to the database in PHP, I want to display an alert confirming successful submission. After clicking OK on the alert, I aim to redirect to a new page showing the submitted data. However, I am having trouble as I am getting redirected ...

Is Canvas.toDataURL functionality disabled on Safari iOS for mobile devices?

I experimented with various methods to display SVG images on a canvas and export them as PNG. While it worked seamlessly on Android, Chrome, Safari, and Firefox, I encountered an issue with mobile Safari on iOS when using canvas.toDataUrl() with SVG images ...

An issue has occurred with NPM CI where the bindings are not available from watchpack-chokidar2:fsevents

After executing npm ci on GitHub Actions, I encountered the following error: Run npm ci npm ERR! bindings not accessible from watchpack-chokidar2:fsevents npm ERR! A complete log of this run can be found in: npm ERR! /home/runner/.npm/_logs/2021-09-17 ...

Webpack encountered an error: SyntaxError due to an unexpected token {

I recently implemented Webpack for my Django and Vue project, but I encountered an error when trying to run webpack. Can anyone help me troubleshoot this issue? $ node --use_strict ./node_modules/.bin/webpack --config webpack.config.js node_modules/webp ...

The functionality of the Toastr "options" seems to be malfunctioning

I am having some trouble with my Toastr notification messages. While the message does display, I seem to be unable to make use of any options that I set. Despite specifying some options, they do not seem to work as intended. $('#editButton').c ...

Trigger the event only when the image is updated

I have a requirement to trigger an event only when the image changes after uploading a file. The code I have written below is firing the event not only on image change but also on page load. I want to prevent the event from firing on page load. How can I ...

The absence of shadows being cast and received is causing issues with the scene's rendering

I've been diving into threejs through game development. I successfully rendered all models in the scene and added some lights, which turned out perfectly fine. However, when trying to cast and receive shadows on the plane, the object shadows in the sc ...

Unable to modify the CSS properties of the titlebar in jQuery UI dialog

Is there a way to modify the background color of a jQuery UI dialog titlebar? Here is the code I am using: jQuery("#divId").dialog({ title: 'Information' }); jQuery("#divId .ui-dialog-titlebar").css("background-color", "red"); For m ...

What are strategies for handling intricate state logic within my Vue.js checkbox component?

I'm facing a few challenges as I dive into learning Vue.js for just one week. Keep in mind that this example is actually nested within a parent component called <question>, but for the sake of simplicity, I've streamlined the code for this ...