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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:51:00+00:00 2026-06-10T03:51:00+00:00

I have a table cell that keep resisting to wrap it contents (a span).

  • 0

I have a table cell that keep resisting to wrap it contents (a span). Here is the escenario according to Chrome dev tools:

The <td> has the following rules:

overflow:visible;
white-space:normal;

The <table> has:

table-layout:fixed;

First row in the table has two columns with fixed width defined; the problematic cell has padding="2".

From my knowledge that should do, but it is not wraping the contents. I have tried unsuccessfully with the following rules:

word-break: break-all;
word-wrap: break-word;
max-width: 120px; /*this is the max width I want to ensure*/

What am I missing here?

  • 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-06-10T03:51:02+00:00Added an answer on June 10, 2026 at 3:51 am

    I don’t know exactly how is your code because you didn’t post it, but I followed your instructions and it worked for me.

    See it here: http://jsfiddle.net/FJ7dB/

    HTML:

    <table>
        <tr>
            <td>TD-1-1</td>
            <td padding="2">
                <span>TD-1-2 ContentContentContentContentContentContentContentContentContentContentContentContentContentContentContentContentContent</span>
            </td>
        </tr>
        <tr>
            <td>TD-2-1</td>
            <td>TD-2-2</td>
        </tr>
    </table>
    

    CSS:

    table{
        table-layout:fixed;
        border:1px solid blue;
    }
    td{
        width:120px;
        max-width:120px;
        word-break: break-all;
        word-wrap: break-word;
        border:1px solid red;
    }
    

    What makes it work is max-width, which you said it was unsuccessful.

    And it isn’t necessary to set

    overflow:visible;
    white-space:normal;
    

    because visible and normal are their default values.

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

Sidebar

Related Questions

I have a table cell that isn't entirely filled with text so the bg
I have a table cell (td) that triggers a script when clicked. I have
I have a table view controller with (among others) a cell that is to
I have a UIButton that is created inside of each table cell. I want
I have a class A that inherits UITableViewCell (to customize a table cell). It
I have the following code that produces a background image in a table cell.
I have an application that loads a cell in various table views. I want
On each cell of my table view I want to have a bar that
I have a table that has a column that contains links. Each cell in
I have a table cell, and when the user clicks on it, I replace

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.