Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6729639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:18:51+00:00 2026-05-26T10:18:51+00:00

I have a web page that has an HTML table generated by an ASP.NET

  • 0

I have a web page that has an HTML table generated by an ASP.NET control. The top row of the table emulates a toolbar. That top row is laid out sort of like this:

<tr>
  <td style="white-space:nowrap;">
    <span>Very long title</span>&nbsp;
  </td>
  <td>
    { bunch of hyperlinks with background images, emulating a toolbar }
  </td>
</tr>

I am stuck with the fact that this is a table, with the contents of the title area being put in a span, and probably with that inline style specifying no wrapping.

This table is supposed to narrow itself when the page narrows, and it does that pretty well. However, if the actual title text (which can vary) is too long, it effectively serves as a limit on how narrow the table can get, which can lead to overlapping with other things on the page. (I’m using IE8, BTW.)

I tried applying overflow:hidden, text-overflow:ellipsis, and display: inline-block to the span and adding a width value for the table cell, all through a stylesheet. (Display:block on the span doubled the height of the row, which I didn’t want, so inline-block was my choice.) The title text appeared truncated, just as I wanted. But the table wouldn’t get any narrower.

After messing around changing values and styles through IEDT I concluded that, when figuring out how narrow the table could get, the text was still counted as being its full length. The span was relatively short, only the text that appeared in the span appeared, but for table-cell width purposes, the text was still all there.

I didn’t find this phenomenon documented anywhere, but maybe I just don’t get around enough. 🙂 If text-overflow can’t help me, I guess I’ll have to dynamically truncate the title through script, which I’d rather not do. Is there a way to do what I want solely through CSS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:18:52+00:00Added an answer on May 26, 2026 at 10:18 am

    Table’s cells display behavior differs from usual behavior of blocks. To make it more typical you need to change table’s table-layout property to “fixed” first and set table width:

    table { table-layout: fixed; width: 100%; }
    

    It will disable cell’s automatic sizing it most cases. After that you can set td’s width and overflow as usual.

    td.title { white-space:nowrap;overflow: hidden; width: 200px; }
    

    Here is example: http://jsfiddle.net/vS3qq/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.NET web page that contains many textboxes. Each textbox has a
I have an ambitious requirement for an asp.net 2.0 web page that contains a
I have a web page that shows a table of data. My page has
I have a simple jQuery code that runs on a web page that has
I have a web application that has a page that loads the content from
In a web application, I have a page that contains a DIV that has
I have an activeX control on my classic ASP page. That page also includes
I have a asp.net page that generates a report. For better or for worse,
I have a web page that has the following content (I've changed the URL
I need to create a table on a web page that has two rows.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.