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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:46:33+00:00 2026-05-29T10:46:33+00:00

In the following example, <table style=width: 100%;><tr> <td>First Cell</td> <td>Second Cell</td> </tr></table> How do

  • 0

In the following example,

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

How do I set the widths so that the first cell/column is exactly as wide as it needs to be to show the content of the first cell and let the second cell fill the rest of the width of the table?

I’m using a GWT HorizontalPanel to do this, so if there’s either a html, css or gwt trick. Please let me know.

Thank you

  • 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-29T10:46:34+00:00Added an answer on May 29, 2026 at 10:46 am

    You could achieve the layout you’re aiming for without tables, as explained in this question:

    • xHTML/CSS: How to make inner div get 100% width minus another div width

    HTML

    <div class="two-columns">
       <div class="fit-to-contents">First Cell</div>
       <div class="fill-remaining-space">Second Cell</div>
    </div>
    

    CSS

    .two-columns {
        overflow: hidden;/* Contains descendant floats */
    }
    
    .two-columns .fit-to-contents {
        float: left;
        background: #ffd;
    }
    
    .two-columns .fill-remaining-space {
        overflow: hidden;
        background: #fdf;
    }
    

    I’m not sure if that would actually be appropriate for your use-case though, I’d need to see the context.

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

Sidebar

Related Questions

I have the following HTML table format: <table style=width: 100%;> <tr> <td> //How to
The following is a 3 x 3 table: <html> <body style=overflow:hidden;> <style> div.table_div {overflow:scroll;width:378px;height:117px;position:relative;}
A table of width 100% is not filling its parent div. Example html: <div
I have the following example in a SQL table Cust Group Sales A 1
I have the following query in VBA: DoCmd.RunSQL INSERT INTO table (value) VALUES ('example')
Example: Suppose in the following example I want to match strings that do not
In the following example should I expect that values.size() will be called every time
I'm have the following working example to retrieve a specific Wikipedia page that returns
I have a Table (or a region) and want to set it's Width and
Let's say I have the following example table GroupID ItemID Created ----------------------------------------------- A ABC

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.