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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:50:40+00:00 2026-06-13T20:50:40+00:00

I have an example: <table class=border style=width:100%> <tr> <td style=width:30% class=border p10> Test </td>

  • 0

I have an example:

<table class="border" style="width:100%">
<tr>
    <td style="width:30%" class="border p10">
        Test
    </td>
    <td style="width:70%" class="border p10">
        <p class="longText">
        Looong text Looong text Looong text Looong text Looong text Looong text Looong text Looong text
        </p>
    </td>
</tr>

CSS:

.longText {
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    width:100%
}

.border {border: solid 1px #ccc}
.p10 {padding: 10px}

You can try it here http://jsfiddle.net/rnwCw/20/

The problem is that the long text destroys the width of the cells (30% and 70%). If I set width for .longText to PX for example 200px so the table is OK. But I need that <P> takes 100% of the cell. How to solve this problem?

  • 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-13T20:50:40+00:00Added an answer on June 13, 2026 at 8:50 pm

    You should apply table-layout:fixed:

    table {
        table-layout:fixed;
    }
    

    Please see fiddle here: http://jsfiddle.net/hARt5/ Is this the result you wish to achieve? Now table rows have 30/70 proportion.

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

Sidebar

Related Questions

I have tried many ways, including the following: <table style=border-collapse: collapse; width: auto; float:
I have for example: <table> <tr class=main><td>test | sum:<span class=sum_main> </span></td></tr> <tr class=sub><td>test |
I have the following html files: <html> <head> <style type=text/css> .table-striped { padding: 0;
For example: In my table I have text field with following text: The quick
Ok, I have an example table with the following information and query. First up
I have two tables, for example: Table A Table B ======= ======= Name |
I have three records in a table example: *Usernames* *email* *city* Nick nick@example.com London
For example I have a table. With a field Idnumber. And the field has
For example I have a table MyTable like this: Id Value Rate 1 10
I have the following example in a SQL table Cust Group Sales A 1

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.