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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:03:00+00:00 2026-06-01T23:03:00+00:00

I am trying to create table where two of the columns are the smallest

  • 0

I am trying to create table where two of the columns are the smallest width needed to contain the content, and the third column would be as wide as possible. I do know how wide the two columns will be and they wont change that much, but I would rather as little hard-coded widths as possible.

Here is what I got:

​<table width="100%">
    <tr>
        <td align="left" style="width:auto;">
            123 123 123 123 123
        </td>
        <td align="center">
            bla bla
        </td>
        <td align="right" style="width:auto;">
            hello
        </td>
    </tr>
</table>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

The first and last columns take more space than needed causing the middle column to not look centered. Is there a way to do this or should I just hardcode the widths?

Edit: The answer is so simple. Here is the full answer in case it helps anyone else:

​<table width="100%">
    <tr>
        <td align="left" style="white-space:nowrap;">
            123 123 123 123 123
        </td>
        <td align="center" width="100%">
            bla bla
        </td>
        <td align="right">
            hello
        </td>
    </tr>
</table>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
  • 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-01T23:03:01+00:00Added an answer on June 1, 2026 at 11:03 pm

    Well you have your table set to 100% width.. it must expand something 🙂

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

Sidebar

Related Questions

I'm trying to create a foreign key on two columns of a table to
I'm trying to create a table with two columns comprising the primary key in
I am trying to create an application which requires a two table SQLite database
I'm trying to create a mysql table from the inner join between two other
I am trying to create a unique constraint on two fields in a table.
I am trying to create a table with a single column using the following
I'm trying to create a table, and can't figure out how to assign two
I'm trying to use Scala/Swing to create a Table, one of whose columns is
I am trying to build a table with two cross tabs and multiple columns.
I have a table in an Openoffice Database, containing two date columns. I'm trying

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.