Forum Bugs

Text-overflow: ellipsis inside table not working as expected

Hi there

What I wanted to accomplish is this:

I.e. text content of a table cell should be wrapped normally. But URLs should be cut and ellipsis added.

This is the HTML/CSS I'm using, which works in the browser, but not with Prince:
<!DOCTYPE html>
    <title>Title of the document</title>
      body {
        width: 640px;
      .ellpis {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    <table width="100%" border="1">
        <th style="width:30%;">Head1</th>
        <th style="width:30%;">Head2</th>
        <th style="width:40%;">Head3</th>
        <td>asifdoihfodsih gsodihgdoihgosi sfsgdgdgsdsrt astsrtresrts astrestrsz aet</td>
        <td>commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricie</td>
        <td style="max-width:0;">
          asifdoihfods ihgsodihgdoihgosi sfsgdgdgsdsrt astsrtresrts astrestrsz aet
          <a class="ellpis" href="#">http://very_long/url/toftheprintingand/typesettingindustry_Lorem/Ipsumhasbeen_theindustrystandarddummy/textypespecimenbook.html</a>

It seems that Prince needs the <TD> to be a block, too. But then max-width:0 doesn't work.
I tried many things but I couldn't find a solution.

Best regards

Edited by bitone

No one?

Prince handles this CSS different than ordinary browsers. Please I need some support with this.

Sorry for the delay, perhaps applying a fixed width to the link block like "width: 200px" might be a reasonable workaround for Prince?
Hey Mikeday

Thanks for your reply!

It does the trick with "max-width:200px;" for the A tag and removing the "max-width:0;" from TD.

It's not an ideal solution, because it breaks the concept of relative sizes. But it's a workaround.