Having difficulty handling text overflow in Angular4 and HTML

I'm facing an issue with displaying a very large text in a table. Despite trying various attributes such as -

{ text-overflow: clip; }

{ text-overflow: ellipsis; }

{ text-overflow: ellipsis-word; }

{ text-overflow: "---"; }

{ text-overflow: ellipsis ellipsis; text-align: center; }

and also using -

overflow-wrap: break-word;

However, when I use the slice function in my component.html, it prevents the tooltip from appearing which is crucial for me.

I need some suggestions on adjusting the CSS to address this problem.

Here is the image showing the overflow

component.css

 #addbtn{
 float:right;
  }
 thead>tr>th:hover {
 cursor: pointer;
 background-color: #384c57;
 color: rgb(240, 202, 132);
 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 
 0.24);
 }
th{
width:1px;white-space:nowrap;
}

table{
font-family: Arial, Helvetica, sans-serif;
 }

thead{
background-color: #33444d;
color: white;
 }


.card{
border: none !important;
 }


#faIcon{
background: #2f4855;
color: white;
border: none;
 }

input:hover {
background-color: rgb(247, 185, 114)  
 }

 input:focus{
 border : 2px solid rgb(247, 185, 114) !important;
 }

 .panel {
 border: none;
 margin-bottom: 0
  }

.panel-transparent {
 background: none;
 }

td{
height:10px;
}

.zoom {
 padding: 50px;

 transition: transform .2s; /* Animation */

 margin: 0 auto;
 }

 .zoom:hover {
transform: scale(3.0); /* (150% zoom - Note: if the zoom is too large, 
 it will go outside of the viewport) */
}


.table{
 color:rgb(255, 255, 255); background-color:rgba(17, 26, 24, 0.452);
 }

.panel-transparent .panel-heading{
background: rgba(44, 51, 59, 0.575)!important;
text-align: center;
color: #fff;

}

.my-pagination /deep/ .ngx-pagination .current {
background: #33444d;

 }

 #close{
 color:#708e9e;
 }

#close:hover{
color: white;
size: 25px;
}

#payloadData{
// border-image-slice: 10%;
 width:15px;
// word-break: break-all;

// box-decoration-break: slice;
white-space: nowrap; 
overflow-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis ellipsis; text-align: center;
direction:ltr;
word-break: break-all;
//  text-overflow: ellipsis;
// text-overflow: ellipsis-word;
 }

component.html

   <td  title="{{dat.PAYLOAD}}" id="payloadData"> 
  {{dat.PAYLOAD}}</td>

Answer №1

Try implementing the word-break: break-word; property rather than using overflow-wrap: break-word;. Additionally, consider setting a max-height for the outer div and utilizing overflow-y:auto. These adjustments could potentially prove beneficial.

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

Adjust the navigation text and logo color as you scroll on the page

I am new to HTML and CSS and I am working on a website with PagePiling.js scrolling feature. I want to change the color of my logo image and navigation text dynamically as I scroll to the next section. Specifically, I only want the part of the logo and tex ...

What are the steps to customize the appearance of a ComboBox using CSS?

I'm struggling to style the items in a combo box when it's dropped down. Currently using vaadin-time-picker on Svelte, but my issue persists due to the combo box included. Despite experimenting with CSS, I haven't had any success. My goal i ...

Attempting to conceal a div element along with its contents using AngularJS

I am attempting to use AngularJS to hide a div and its contents. I have defined a scope variable initialized as false and passed it to the div in order to hide it. However, the div is still visible along with its content. <script type="text/javascr ...

The "ngx-phone-select" directive is not defined with the "exportAs" attribute

Having an issue with ngx-phone-select in the phone number field, receiving the error message "There is no directive with "exportAs" set to "ngx-phone-select" http://prntscr.com/hzbhfo This problem occurs in Angular 4.3 using ngx-phone-select version 1.0. ...

I need assistance in utilizing my PHP variable UserNameID to remove the specific user's row from the database

I want to give users the option to delete their account from the database with a simple button click on my php forum. See the code snippet below: <div class="btn-group"> <button style="width:200px" type="button" class="btn btn-primary"> ...

Challenges in working with PHP, SQL, HTML, and AJAX data submission

Having encountered another issue, I've been attempting to make an AJAX script function properly, but whenever I click on it, the page reloads without updating the database field. The code I'm using has successfully worked for similar scripts on ...

Generating forms dynamically with Vuetify

When working with HTML code, the structure looks like this: <v-col cols="12" md="4" v-for="(leadObj, i) in lead.data" :key="i" > <v-col v-if="leadObj.inputType !=='select'"> ...

Loop through the <li> elements and use jQuery to update the text

Check out this HTML setup: <div class="mydiv"> <ul> <li>Text 1</li> <li>Text 2</li> </ul> <ul> <li>Text 3</li> <li>Text 4</li> </ul> <ul> < ...

Enhance your Zara shopping experience with the dynamic image zoom-in

I am currently exploring ways to replicate the image zoom-in feature seen on Zara's product pages. To see this effect in action, visit their site: Upon clicking on the image, it opens up in a popup window where it is enlarged to fit the entire screen ...

Exploring the process of querying two tables simultaneously in MySQL using PHP

I currently have a search box in my PHP file that only searches from the "countries" table. However, I also have another table called "continent" and I would like the search box to retrieve results from both the "countries" and "continent" tables. Here is ...

The <img> element is able to fill an entire div while maintaining its original aspect ratio

I am currently facing a challenge with implementing a responsive gallery slider in Bootstrap. In order to achieve responsiveness, I need to use properties like max-height. The issue arises from the fact that the images in the gallery can vary in size and ...

The select tag is malfunctioning in the Firefox browser upon clicking with the mouse

One of the select tags in my application is causing issues in Firefox browser. Although all other select tags in different pages work fine, this particular page seems to be problematic. When attempting to change the option in the select tag, it fails to r ...

Sorting feature fails to function properly when used in combination with pagination and

<table> <thead> <tr> <th class="col-md-3" ng-click="sortDirection = !sortDirection">Creation Date</th> </tr> </thead> <tbody> <tr dir-paginate="item in items | filter:itemFilter | items ...

Troubleshooting Angular: Issues with Table Data Display and Source Map Error

I'm currently tackling a challenge in my Angular application where I am unable to display data in a table. When I fetch data from a service and assign it to a "rows" variable within the ngOnInit of my component, everything seems to be working fine bas ...

Attempting to showcase a pair of unordered lists side by side using the power of flexbox

I am having trouble getting this to display on a single line, no matter what I try. While there may be simpler ways to achieve this without using flexbox, I am eager to learn how to do it using flexbox properties. My desired outcome is to have the first u ...

Turning an angular API into a synchronous one: A step-by-step guide

My goal is to perform consecutive http calls to a REST service, with each call requiring a unique valid token in the header. The challenge arises when multiple components initialize simultaneously and make "get" calls at the same time using the same token. ...

"Encountering a 400 bad request error when making a Graphql POST

Seeking assistance with my graphql code. I have included the service and component files below. I am currently new to graphql and not utilizing the apollo client; instead, I am attaching a query on top of the HTTP POST call to send requests to the graphql ...

Convenient method for extracting the final element within a jQuery section

I need to determine whether the div with the class "divclass" contains an anchor tag. If it does, I have to run a specific block of JavaScript code; otherwise, no action is required. <div class="divclass"> <span> some text</span> ...

Struggling to find your way around the header on my website? Let me give

I'm looking to display certain links prominently at the top of a page, similar to this example: "home > page1 > link1 > article 1." Can someone advise on how to achieve this using HTML, PHP, or jQuery? ...

Adjusting the height of a table column to accommodate lengthy text without disrupting the layout of adjacent columns

I am encountering an issue while creating an invoice using an HTML table. The problem arises when the customer address value is too long, causing the sold by column to shift downwards. I need a way to break the customer address value when it reaches the ma ...