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 7557847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:14:18+00:00 2026-05-30T12:14:18+00:00

I am attempting to do a one line overflow on an element in a

  • 0

I am attempting to do a one line overflow on an element in a td when it’s contents exceed that of its parents when using relative widths.

 ┌─────────────────────────────────────────────────────────────────────┐
 |10%    60%                                       30%                 |
 |Left   Middle (This content should not exceed... Right               |
 |                                                                     |

This jsfiddle is what I’ve managed so far. A previous question received an answer that I thought would be a solution, however that doesn’t appear to work with % widths. I am looking for a CSS solution before resorting to a JavaScript work around.

Note: I don’t need an inner element, if CSS styling can be applied directly to the outer element that would be great also.

Many thank,

Thomas Nadin

  • 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-30T12:14:20+00:00Added an answer on May 30, 2026 at 12:14 pm

    You have to simply change

     table {
         width: 100%;
     }
    

    to

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

    and everything will work as you expect it to work. (see this jsfiddle)

    All the magic lies in the table-layout:fixed; property, which defines that the table should be exactly as wide as you have defined it.

    table-layout:fixed; is pretty well supported, except for IE/Mac (https://developer.mozilla.org/en/CSS/table-layout).

    EDIT

    I just read the question again, and saw that you want to drop the inner <div>. With this solution it’s possible, just drop it and apply the class overflow to the td.second (so you are flexible and can apply it also to multiple columns if you want to). See the result in this fiddle.

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

Sidebar

Related Questions

I am attempting to write a one-line Perl script that will toggle a line
I'm attempting to shrink a file in place. I'm replacing the contents of one
I have created an array of structs. I am attempting to pass one element
I'm attempting to write a simple one-line script to ssh into a remote host,
I'm attempting to learn C++ and one exercise is to build a command line
We have a multi-line control that we are attempting to prevent the Enter/Return key
I am attempting to insert a parsed XML element into the middle of a
I am attempting to port one of my hobby project to linux. Preferrably to
I'm currently attempting to code one for part of a college project - binary/hex
I'm attempting to bind a DependancyProperty in one of my usercontrols to the Width

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.