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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:36:47+00:00 2026-06-09T06:36:47+00:00

I have this DIV <div style=width:500px;> </div> I’ve inserted a table inside it <table

  • 0

I have this DIV

<div style="width:500px;"> </div>

I’ve inserted a table inside it

<table style="width:100%;">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>

If <td></td> contained normal words, even if 100 words with spaces between them, then table will maintain its size inside the div, but if a cell contained 1 word with like 100 letters, then the table will take a bigger size outside its parent div, overflow:hidden; is good to hide the table’s enlargement, but I want the size to stay the same, and the cell to grow in height, like it usually do with normal words.

  • 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-09T06:36:49+00:00Added an answer on June 9, 2026 at 6:36 am

    word-wrap is an older IE specific CSS rule. To get word wrapping in modern browsers, use white-space. Also, setting max-width seems to help get things working.

    td {
      border: 1px solid black;
      width: 100px;
      max-width: 100px;
      white-space: pre-wrap; /* css-3 */
      white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
      white-space: -pre-wrap; /* Opera 4-6 */
      white-space: -o-pre-wrap; /* Opera 7 */
      word-wrap: break-word; /* Internet Explorer 5.5+ */
    }
    

    jsFiddle DEMO

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

Sidebar

Related Questions

I have a master page in C#, where I have this code: <div style=width:
I have this JSF page: <div id=settingsdiv style=width:350px; height:400px; position:absolute; background-color:r; top:20px; left:1px> <h:form>
say for example i have 2 div in a div like this <div style=width:
I have this in HTML: <div class=dataBurst title=What is the Matrix?> <table align=center height=100%>
I have this CSS style that does a rounded corners for div border, but
I have something like this currently: <div class = className style = position: absolute;
I have a Div layer like this ... <style type=text/css> <!-- #newImg { position:absolute;
I have this div in my code: <div id=advice class=validation-advice style=>some text here</div> Now,
I'm learning Jsoup and have this HTML: [...] <p style=...> <!-- div 1 -->
I have this div inside a repeater, where i set the class, onmouseover and

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.