The Bootstrap 4 card component is a versatile and stylish

Currently working on a display layout using Bootstrap 4, specifically utilizing cards.

The issue I'm facing is that the text exceeds the limit of the card, causing it to overflow. Is there a solution to make the text automatically wrap to the bottom instead?

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" />

<div class="scrolling-wrapper">
  <!-- Board card -->
  <div class="card bg-light" style="width: 320px;">
    <div class="card-body">
      <div class="row">
        <p style="font-weight: 600; font-size: 17px;" class="text-dark">
          To Do
        </p>
      </div>
      <!-- Board task -->
      <div class="row mb-2">
        <div class="board-content">
          <div class="row">
            <div class="col-6">
              <p class="brandName card-title card-text">
                Register asokdasokd apodk saoksa dokasokdpask asdasa gdffgfdfgdffgdfgfddffgf gdgdfgdf
              </p>
            </div>
            <div class="col-6 text-right">
              <button class="btn btn-primary">tes</button>
            </div>
          </div>
        </div>
      </div>

      <!-- Button create task -->
      <div class="row justify-content-center">
        <button class="btn p-0 mt-2 btn-transparent btn-create-task" data-toggle="modal" data-target=".bd-example-modal-lg">
                          <i class="fas fa-plus"></i> Create Task
                        </button>
      </div>
    </div>
  </div>
  <!-- End of board -->

Answer №1

To achieve text wrapping and overflow in Bootstrap, you can use the text-wrap class.

<p class="brandName card-title card-text text-wrap">
  Register asokdasokd apodk saoksa dokasokdpask asdasa gdffgfdfgdffgdfgfddffgf gdgdfgdf
</p>

Answer №2

What happens when you add a brake-line to the content?

For instance:

Enter sample text here <br>
more sample text goes 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

Is it possible to dynamically load JavaScript?

I'm currently working on a project that requires me to dynamically add JavaScript. I have a global.js file that contains all the global variables I need to add dynamically. However, I'm facing an issue where global.js is not being added before ut ...

Struggling with running my React App as I'm encountering some errors

Check out the code on Github: https://github.com/bhatvikrant/IndecisionApp I have already run npm i and then executed yarn run dev-server, utilizing webpack. My operating system is MacOs. I have also created the .babelrc file. The issue I encountered aft ...

Different Types of Buttons in HTML

As someone who is new to the world of HTML coding and JavaScript, I have a question about button types. According to the W3Schools website, there are three types of buttons: <button type="button|submit|reset"> First question: Why do we need a for ...

Guide on including a partial view in a modal using Jquery

Looking to enhance the parameters of a list of products by displaying a modal window for editing? You can achieve this by including a button in each row that triggers the modal window... https://i.sstatic.net/kDw6q.png The Edit button code in Index.csht ...

Retrieving JSON data value without a key using AngularJS

I am struggling to retrieve a data value from a JSON array in Angular that does not have a key value. While I have come across examples of extracting values with keys, I haven't been able to crack this particular piece. The JSON returned from the API ...

Populate my empty arrays with information retrieved from Firebase

I am currently working on creating a "single client" view for my application. Each client has a first name (prenom) and a last name (nom). However, even though my application recognizes that these values exist for each client, they do not appear on the scr ...

Exploring the versatility of Angular 4 by implementing a switch feature with

My goal is to have the menu change based on the click of the "Cadastros" action, but it seems like the issue lies with the "workspaceSelected" property not being visible to all components. I believe the best approach in this situation would be to have the ...

Fetching server-side JavaScript source from a relative path within an ASP file

My setup involves a local IIS server pointing to a virtual workspace at c:\projects Within my c:\projects directory, I have the following folder structure: Game src asp test.asp jquery jquery.min.js The test ...

Arranging Fancybox images into categories

I am currently experimenting with the fancybox function. It seems to be working fine, but for some reason it is not grouping up based on my Rel attribute. Below is the JavaScript code: <script type="text/javascript"> $(function($){ var ...

Transfer the information from dropped files in a div to a separate page

document.getElementById('drag_drop').ondrop = function(event) { event.preventDefault(); var form_data = new FormData(); var drop_files = event.dataTransfer.files; for(var count = 0; count < drop_files.length; count++) ...

What is the significance of using composability over the deprecated method in Reactjs Material-UI menuItems?

I have taken over a project that was built using an older version of react, and I am currently in the process of updating it. However, I encountered console errors right off the bat. Error : bundle.js:6263 Warning: The "menuItems" property of the "Left ...

Show various forms that gather information

Upon selecting an option from the drop-down menu, a certain number of forms will be displayed with captured data. For example: Imagine owning a form with fields such as No. of Applicants, Applicant Name, Telephone, E-mail, etc... If the user selects 2 fo ...

Library for visualizing JavaScript code using flowcharts and diagrams

Is there a jQuery-based javascript library available for client-side rendering and manipulation of flow-charts? I am open to other options as well. This question has been previously posed, but has not been revisited in a few years. Hopefully, there are ne ...

A guide to customizing nested elements in react using styled-components

Currently, I am utilizing styled components to apply styles to a child element inside a div using nested css. For a demonstration, you can view my example here const customStyles = theme => ({ root: { ...theme.typography.button, background ...

Customizing Material UI Themes

Is there a way to customize the MuiTheme overrides for a specific named element like this? .MuiStepLabel-label.MuiStepLabel-active { color: rgba(0, 0, 0, 0.87); font-weight: 500; I've attempted modifying various classes such as MuiStepLabelLa ...

Is there a method to implement a pop-in animated contact form without the use of Javascript or query selectors?

Although I was successful in creating a contact form with this functionality using Javascript, I encountered some difficulties when attempting to achieve the same result without it. My goal is for the form to slide in from the right when the "open" icon is ...

chart.js version 3 does not display the correct date data on the time axis

Struggling to make chart.js work with a time axis is proving to be quite challenging for me. The code I have is as follows: <html> <head> <script src="https://cdn.jsdelivr.net/npm/moment"></script> <script src="https://cdnjs.clo ...

Enclose this within Stencil.js components

Is there a more efficient way to utilize a nested "this" in a Stencil.js component? Currently, I find myself following this approach: render() { let thisNested = this; return <Host> {this.images ? this.imagesArray.map(fu ...

The chat message section is failing to update due to AJAX not refreshing

I recently launched a new website and am facing challenges with the chat feature. Despite using ajax to update the chat messages without refreshing the page, the other user still needs to refresh in order to see the latest message. We are both in the sam ...

How can one locate the text coordinates within a div using JavaScript?

My current task involves locating the exact coordinates of the word "The" within this Wikipedia page once it has been displayed, similar to the coordinates provided by Chrome's developer tools. See a screenshot of developer options here. <div>Th ...