What is the best way to disrupt the flow of a text column once it reaches a specific width?

I'm experimenting with the text column property to make my content more user-friendly. However, I've encountered an issue where I want the columns to disappear when the screen size is reduced to a certain width, like 50px in this example. I attempted to set the column count to 0 within a media query for the minimum screen width, hoping it would convert the columns into a standard paragraph format. Strangely, this solution works outside of the media query but not inside. I also tried adding default text, but it didn't resolve the problem.

Below are my HTML, CSS, and CodePen link. Any assistance is greatly appreciated.

CodePen Link: https://codepen.io/alexbicycle/details/ExyzdEG

HTML:

<section class="section-intro" id="skills-part-of-page">
    <h2 class="section-intro-title">SKILLS</h2>
        <div class="section-text-columns-container">
              <p class="text-columns">
                   Lorem ipsum dolor sit amet, consectetur adipiscing 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>
</section>

CSS:

.section-text-columns-container{
    width: 50%;
    margin-left: 21vw;
    position: relative;
    bottom: 15vh;
}



.text-columns{
     /*To split text & have side by side*/
    column-count: 2;
     -webkit-column-count: 2;
     column-gap: 5vh;
     -webkit-column-gap: 4vh;
     text-align: left;
}

@media screen and (min-width: 50px){
  .section-text-columns-container{
    width: 50%;
    margin-left: 10vw;
    background-color: grey;
  }
  
  .text-columns{
     column-count: 0;
     -webkit-column-count: 0;
    display: inline-block; 
    padding: 1%;
    word-break: initial;
  }
}

Answer №1

Substitute column-count: 0; with column-count: initial;

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

Using Vue.js to pass an image URL as a prop for CSS animation by converting it to a CSS variable

Need help with a component that features a hover animation displaying 4 rotating images: animation: changeImg-1 2.5s linear infinite; @keyframes changeImg-1 { 0%, 100% { background-image: url('images/wel1.png'); } 25% { background-image: ur ...

Why is object-fit not functioning properly? Could it be that the container is influencing the object-fit

Why isn't object-fit working? It only seems to work with inline styling in the image tag. Could it be the hero_media container affecting object-fit? I'm also attempting to use pseudo-elements (after and before) to add text to the image. Is it nec ...

Opening on the Left Side of the Uppermost Panel

There is an unexpected gap showing up on the left side of my "navigation menu" as I work on creating it using a Master Page: Disclaimer: The top gray area in this screenshot is actually the bottom of the Chrome address bar and is not part of the website ...

Please rewrite the following sentence: "I am going to the store to buy some groceries."

As I navigate through my styled HTML page, an interesting sequence of events unfolds. When the Create New List button is clicked, a pink div emerges, contrasting with the orange hue of the All Lists div. At this moment, a new user has joined but hasn' ...

Showing a variety of pictures within a specified time frame

In my CSS, I have defined classes that allow me to display different background images on a page at set intervals: .image-fader { width: 300px; height: 300px; } .image-fader img { position: absolute; top: 0px; left: 0px; animation-name: imagefade; ...

Prevent duplicate rectangles by cleaning up dirty rectangles

I'm looking to optimize the performance of my game by only clearing the necessary parts of the canvas that contain animations. Below is a snippet of my code: this.draw = function(context) { context.clearRect(this.oldx, this.oldy, this.width, ...

Set the style properties of one class to match the style properties of another class using JavaScript

I need to dynamically create a div using the Bootstrap panel for displaying it. The div's class will either be "panel panel-success" or "panel panel-danger" based on the server response, which can be either "success" or "failure." To assign the class ...

ReactJS not responding to Bootstrap toggler button

My Bootstrap toggler button is not working in ReactJS. I did not include the jQuery scripts because I imported Bootstrap at the top. The button should only appear and function on small devices. import React from 'react'; import 'bootstrap/d ...

How to reduce the default width of Bootstrap carousel components

Click here for the 1st image. To view the 2nd image, click here. This represents the carousel code used on this particular website: <div class="row testing"> <div id="carouselExampleMen" class="carousel carousel-dark s ...

Customize the appearance of the wp-login.php page

I have a Wordpress CMS website where most labels are required to be white. The theme includes the following styles for form labels: .login label { color: #fff; font-size: 14px; } This style is applied from within the /wp-login.php file, with the ...

Is it feasible to utilize a CSS variable within a CSS "background URL" property?

Having trouble setting a base domain for all my pictures in a CSS file. Here's what I've tried: In global.css: :root { --bgd: #C0C0C0; --picdomain: "https://somedomain.com/"; } In s1.css: @import url("global.css"); body { background-co ...

IE 11 is giving me trouble with max-width functionality

As a new designer, I recently created my own WordPress theme that functions perfectly on FireFox, Chrome, and Opera. However, I encountered an issue with InternetExplorer (I'm using Windows 7 with IE 11). It appears that InternetExplorer 11 does not ...

Is it possible to have evenly spaced divisions within a fixed wrapper?

I have been experimenting with creating a dynamic navbar that remains at the top of a webpage. Here's what I have so far: <style> .sticky-nav-wrapper > div { color: #000000; display: inline-block; display: -moz-inline-box; * ...

Show the menu when hovering in reactjs

Currently, in my react project, I am implementing dropdown menus using the reactstrap css framework. Example.Js <Dropdown className="d-inline-block" onMouseOver={this.onMouseEnter} onMouseLeave={this.onMouseLeave} ...

When utilizing an API to render text into a div, the offsetHeight function may return 0

I'm working with a div that displays text fetched from an API call. I'm trying to implement a See more button if the text exceeds 3 lines. Here is my approach: seeMore(){ this.setState({ seeMore: !this.state.seeMo ...

Modify a different tag within CSS

I am attempting to reduce the space between the words: "frihedskamp og fremtidsforelskelse" When I remove the CSS tag in line 149, the spacing returns to normal. To address this, I tried adding the following override on line 266: HTML <div class="col ...

Extracting the nearest tag for a specific element by utilizing text containment in Selenium with Java

Is there a way to fetch the tag under which the text is visible without selecting parent elements that contain the same text when using getTagName for all tags? <ul> <li> The Text </li> </ul> In the example above, if we use contain ...

How can I locate a div element using multiple class names?

<div class="value test" /> I am trying to locate this specific element on the web page which has two classes assigned to it. Since className does not accept space-separated values, I am exploring alternative ways to achieve this. Any suggestions? ...

Unlimited rotation - using setInterval function

I am encountering an issue with removing the move class from my code. Can someone please check it out for me? let lis = document.querySelectorAll('li') let arr = []; for (let i = 0; i < lis.length; i++) { arr.push(lis[i]); } setInterval( ...

What could be the reason for the checkbox being toggled twice?

Here is the code snippet I am working with: $("input[type='checkbox']").each(function() { var current = $(this); $("label[for='" + current.attr("id") + "']").on('click', function() { current.change(); al ...