CSS text-overflow ellipsis not working

0 votes

I'm not sure why this basic CSS isn't functioning...

.app a {
  height: 18px;
  width: 140px;
  padding: 0;
  overflow: hidden;
  position: relative;
  margin: 0 5px 0 5px;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
}
<div class="app">
  <a href="">Test Test Test Test Test Test</a>
</div>
Jun 9, 2022 in CSS by Edureka
• 13,620 points
4,655 views

1 answer to this question.

0 votes
So, if you've arrived at this question because you're having difficulties getting the ellipsis to operate inside a display: Try adding min-width: 0 to the outmost container that's overflowing its parent, even if you've previously set overflow: hidden to it, and see how it works for you.
answered Jun 10, 2022 by Edureka
• 12,690 points

Related Questions In CSS

0 votes
0 answers

input[type='text'] CSS selector does not apply to default-type text inputs?

Text is the default input type. Therefore, ...READ MORE

Aug 12, 2022 in CSS by Edureka
• 13,620 points
528 views
0 votes
1 answer

How do I give text or an image a transparent background using CSS?

Use either a semi-transparent PNG or SVG ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
625 views
0 votes
1 answer

Is there any way to animate an ellipsis with CSS animations?

You might try to time each ellipsis ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
1,241 views
0 votes
1 answer

How to insert spaces/tabs in text using HTML/CSS

For spaces, use &nbsp;, for (less than, ...READ MORE

answered Jun 1, 2022 in CSS by Edureka
• 12,690 points
616 views
0 votes
1 answer

Flex wrap and overflow on both column and row

Here's a workaround, but it comes with ...READ MORE

answered Jun 13, 2022 in CSS by Edureka
• 12,690 points
4,888 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,594 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,250 points
2,875 views
0 votes
1 answer

nbsp not working in CSS content tag

May be this could be the solution ...READ MORE

answered May 28, 2022 in CSS by Edureka
• 12,690 points
1,112 views
0 votes
1 answer

input[type='text'] CSS selector does not apply to default-type text inputs?

Because that is not what it is ...READ MORE

answered Jun 28, 2022 in CSS by Edureka
• 12,690 points
1,606 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP