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

  • Home
  • SEARCH
  • 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 96983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:55:04+00:00 2026-05-10T23:55:04+00:00

I have an HTML table that looks like this: ————————————————- |Column 1 |Column 2

  • 0

I have an HTML table that looks like this:

------------------------------------------------- |Column 1                   |Column 2           | ------------------------------------------------- |this is the text in column |this is the column | |one which wraps            |two test           | ------------------------------------------------- 

But I want it to hide the overflow. The reason here is that the text contains a link to more details, and having the ‘wrapping’ wastes lots of space in my layout. It should like this (without increasing the widths of the columns or the table, because they’ll go off the screen/create a horizontal scrollbar otherwise):

------------------------------------------------- |Column 1                   |Column 2           | ------------------------------------------------- |this is the text in column |this is the column | ------------------------------------------------- 

I’ve tried lots of different CSS techniques to try to get this, but I can’t get it to turn out right. Mootables is the only thing I’ve found that does this: http://joomlicious.com/mootable/, but I can’t figure out how they do it. Does anyone know how I can do this with my own table using CSS and/or Javascript, or how Mootables does it?

Sample HTML:

<html><body> <table width='300px'> <tr>     <td>Column 1</td><td>Column 2</td> </tr> <tr>    <td>this is the text in column one which wraps</td>    <td>this is the column two test</td> </tr> </table></body></html> 
  • 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. 2026-05-10T23:55:04+00:00Added an answer on May 10, 2026 at 11:55 pm

    Use the CSS property white-space: nowrap and overflow: hidden on your td.

    Update

    Just saw your comment, not sure what I was thinking, I’ve done this so many times I forgot how I do it. This is approach that works well in most browsers for me… rather than trying to constrain the td, I use a div inside the td that will handle the overflow instance. This has a nice side effect of being able to add your padding, margins, background colors, etc. to your div rather than trying to style the td.

    <html> <head> <style> .hideextra { white-space: nowrap; overflow: hidden; text-overflow:ellipsis; } </style> </head> <body> <table style='width: 300px'> <tr>     <td>Column 1</td><td>Column 2</td> </tr> <tr>    <td>     <div class='hideextra' style='width:200px'>         this is the text in column one which wraps</div></td>    <td>     <div class='hideextra' style='width:100px'>         this is the column two test</div></td> </tr> </table> </body> </html> 

    As a bonus, IE will place an ellipsis in the case of an overflow using the browser-specific text-overflow:ellipsis style. There is a way to do the same in FireFox automatically too, but I have not tested it myself.

    Update 2

    I started using this truncation code by Justin Maxwell for several months now which works properly in FireFox too.

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

Sidebar

Ask A Question

Stats

  • Questions 260k
  • Answers 260k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to clean up your code a bit. Jumping… May 13, 2026 at 11:28 am
  • Editorial Team
    Editorial Team added an answer Use the color Transparent for the backgtround and a file… May 13, 2026 at 11:28 am
  • Editorial Team
    Editorial Team added an answer I was able to solve this because I was using… May 13, 2026 at 11:28 am

Related Questions

I have an HTML table that looks like this: ------------------------------------------------- |Column 1 |Column 2
I have an HTML table of tickets listings (e.g. http://seatgeek.com/event/show/23634/buffalo-bills-vs-tennessee-titans/ ). I'd like to
I have an ASP.Net UserControl that looks like this: <%@ Control Language=C# AutoEventWireup=true CodeBehind=WebUserControl1.ascx.cs
If I have code inside an ASP.NET MVC view that looks like this: <%
I was wondering if there is an existing control that I could use to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.