Ensuring the alignment of two divs horizontally on the smallest screen size

I am facing an issue with arranging two divs horizontally. It is working fine on large, medium, and small screens, but when I switch to the extra small screen size (xs), it doesn't work as expected.

The code snippet in question is as follows:

<div class="container">
  <div class="row">
    <div class="col-lg-3 col-md-3 col-sm-4 col-xs-2" id="Leftlist">
      <ul>
        <li>ABC</li>
        <li>DEFG</li>
        <li>HIJ</li>
        <li>KLM</li>
        <li>NOP</li>
        <li>QRST</li>
        <li>UVW</li>
        <li>XYZ</li>
      </ul>

    </div>

    <div class="col-lg-9 col-md-9 col-sm-8 col-xs-10" id="RightPara">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>

  </div>

</div>

The code functions correctly for large, medium, and small screens. https://i.sstatic.net/76XIi.png

However, it fails to display properly on extra small windows. https://i.sstatic.net/4j9lQ.png

If anyone can provide guidance on resolving this issue, it would be greatly appreciated.

Answer №1

col-xs- has been removed in Bootstrap 4 and replaced with col-.

Try swapping out col-xs-2 and col-xs-10 with col-10 and col-2 and see if it resolves the issue. Let me know how it goes! :)

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

HTML Table Column Alignment: Ensuring a Clean and Organized Layout

I'm currently working on constructing tables that demonstrate parent/child connections. Consider this example. <head> <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_em ...

The journey of a JavaScript file within an iframe devoid of any src attribute

Consider this scenario: In a folder labeled /jscript, there are two files named my_js_file1.js and my_js_file2.js. I also have an /index.html page structured like this: <html> <head> <script type='text/javascript' sr ...

Is there a way to leverage JavaScript to click on one div and modify the settings of another div simultaneously?

I am struggling with my code which has unnecessary information. <div> <div id="one" class="button"></div> <div id="two" class="button"></div> </div> <div> <div class="Home tab"> < ...

Embed a javascript tag to print a PDF document

I have been struggling with printing a PDF file using JavaScript. I attempted to use the embed trick suggested in this Silent print a embedded PDF but unfortunately, the print function remained undefined. Then, I tried another approach using an Iframe and ...

How can one properly utilize material-ui CSS?

Just starting out with material-ui and react, I'm currently following this palette customization guide from Material-UI. However, when attempting to replicate the example shown, I encountered the error: Cannot read property 'prepareStyles' ...

Save the Selenium HTML source code into an HTMLDocument element

Is there a way to save the HTML code fetched using Selenium (via Excel VBA) into an HTMLDocument element? The following example demonstrates utilizing Microsoft Internet Controls and Microsoft HTML Object Library for automating Internet Explorer. Dim IE ...

How can I eliminate margin and padding from html and body elements in a Vue application?

I have a project that was created using the command vue init webpack my-project. Here is my main.js file: import Vue from 'vue' import App from './App.vue' new Vue({ el: '#app', render: h => h(App) }) and my App.vue ...

How to Deactivate Horizontal Scrolling Using CSS in WordPress

Hey there, I'm currently working on a WordPress blog and facing an issue. Here's the link to my problem: When I resize the browser (X-Axis) to a minimum, like when using a mobile device, I noticed that I can scroll to the right in the Content se ...

Utilize CSS to create a column layout

I have some HTML output that I would like to style using CSS, but unfortunately I have no control over how the HTML is generated and cannot make any changes to it. Right now, I have a two-column layout set up here: http://jsfiddle.net/uvg6f3tr/ I'm ...

Include numerous values within a hyperlink

Is there a way to pass three values through a link without displaying them in the URL? ...

"Utilizing jQuery to achieve vertical center alignment within a div

Attempting to vertically center a div within another div that has 100% dimensions is proving to be a bit challenging. The code I have written seems to work but occasionally triggers an odd bug. This is the snippet of code in question: var window_height = ...

Guide to altering the color of text entries in the search bar using a clickable button

Is there a way to display multiple values in the search field using a single button, and also have them appear in a specific color such as green? http://jsfiddle.net/7bpaL5hy/ <form id="form1" name="form1" method="post"> <p> < ...

Locate specific text within the content and apply an underline to it

Is there a way to locate specific text on my website and apply an underline to it? Suppose I have some text displayed and I wish to identify all instances of the word hello and underline them. Here is my attempt at the code: $( "body:contains('hell ...

Modifying the display property of an element using JavaScript

Hello, I'm encountering an issue with a section of my javascript code. I am attempting to make the #showAddress element display as block when the deliverservice radio button is clicked or checked. I have tried searching for solutions on Stack Overflow ...

Trouble with HTML CSS rendering compatibility across different browsers

So, I've built this page with a gradient background and three white divs acting as columns. Each column contains some text, and it displays perfectly in Google Chrome. However, the gradient appears taller in Firefox and Internet Explorer, pushing the ...

Tips for implementing validation in a multi-step form as outlined in w3schools tutorial

I came across a multistep form creation tutorial on w3schools. However, the tutorial only covers generic validation (checking if a field is empty), which is not sufficient for my needs. How can I implement HTML validation (e.g., min, max, length) for text ...

Choosing a value from an HTML5 datalist using Selenium

When attempting to choose from a datalist, I am encountering an issue where only the first element in the list is selectable. Below is an example of the HTML snippet: <td> <input id="applianceFilterTextbox" class="flat" name="applianceFilter" li ...

Ways to modify the header dimensions using CSS

I've been trying to figure this out, but I can't find a solution. For the structure, I'd like to use an h2 header to make it more semantic, but I want it to appear as an h5 header visually. However, CSS is not cooperating with this idea an ...

Tips for managing the react-bootstrap carousel using personalized buttons

In order to have control over carousel slides using custom buttons, I managed to achieve this with reference to this Example. Below is the code implementation: import React, { useState } from "react"; import { Carousel, Button, Container, Row } ...

Transform audio file into a base64 encoding

I am currently developing a Phonegap application for a friend that will allow users to record audio on their phone, save it to the browser's local storage, and then upload it at a later time. As far as I know, local storage does not support storing b ...