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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:23:15+00:00 2026-05-30T00:23:15+00:00

How to reduce width of text boxes? newyork should be seen in second column

  • 0

How to reduce width of text boxes? newyork should be seen in second column
I want this table to be in a good fix:

     <table style="background-color:#778899; width: 100%;" cellpadding="0" cellspacing="0">
   <tr>
      <td><th><font color="white">Distance(i,j)</font></td>
      <td><th><font color="white">newyork</font></th></td>
      <td><th><font color="white">chicago</font></td>
      <td><th><font color="white">topeka</font></td>
   </tr>
   <tr>
        <td><th><font color="white">seattle</font></th></td>
        <td style="background-color:#CD5C5C; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
        <td style="background-color:#87CEEB; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
        <td style="background-color:#000080; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
</tr>
<tr>
    <td><th><font color="white">san-diego</font></th></td>
    <td style="background-color:#CD5C5C; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
    <td style="background-color:#87CEEB; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
    <td style="background-color:#000080; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></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-05-30T00:23:17+00:00Added an answer on May 30, 2026 at 12:23 am

    You don’t have to use <td> and <th> at the same time. I didn’t reduce the width (you can reduce the 100% width in each input if you want it to be reduced or use the size attribute)

    Check this jsfiddle: http://jsfiddle.net/e3pHj/

    Here is the code:

        <table style="background-color:#778899; width: 100%;" cellpadding="0" cellspacing="0">
       <tr>
          <th><font color="white">Distance(i,j)</font></th>
          <th><font color="white">newyork</font></th>
          <th><font color="white">chicago</font>
          <th><font color="white">topeka</font></th>
           </tr>
       <tr>
            <th><font color="white">seattle</font></th>
            <td style="background-color:#CD5C5C; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
            <td style="background-color:#87CEEB; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
            <td style="background-color:#000080; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
    </tr>
    <tr>
        <th><font color="white">san-diego</font></th>
        <td style="background-color:#CD5C5C; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
        <td style="background-color:#87CEEB; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
        <td style="background-color:#000080; padding: 3px;"><div style="margin-right: 3px;"><div style="padding-right: 3px;"><input type="text" style="width:100%;"></div></div></td>
    </tr>
    </table>​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I reduce the textbox width without using classes? <input type=text maxlength=5 style=3px/>
I want to do something like this: .even { float: left; text-align: left; }
I'm writing a style sheet, and I want to display three elements horizontally (width=33%)
I tried this JavaScript code: dx = document.getElementById('box').style dx.backgroundColor= '#fff' dx.visibility = "visible"; dx.width
I recently encountered with this question: How to reduce this expression: s>73?61:60; . The
I am creating a site with lots of big scrollable text-boxes in it. Each
The idea is to reduce text length to fit into a box of a
i want to reduce the spacing inside my web page: The problem is the
I have large zoomable bitmaps with text, that I want to resize a little
I have a fixed width and height DIV, and I need to put text

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.