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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:27:47+00:00 2026-05-23T09:27:47+00:00

My site allows users to generate tables with PHP. The number of rows and

  • 0

My site allows users to generate tables with PHP. The number of rows and cells is variable but the number of columns is always fixed. The table usually generates two digit numbers. When the table generates three digit numbers the entire table expands to accommodate this and the size of the table increases, ruining my layout. Is there a way to use CSS and style this table’s tds so that the table doesn’t change size when 3 digit numbers are generated. (3 digits are the longest). I tried adding padding to the table, but its not working.

Also, should I use an id in table or class?

  • 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-23T09:27:47+00:00Added an answer on May 23, 2026 at 9:27 am
    td {
      width: 50px;
    }
    

    I think something like that might work for you. Obviously, you can adjust the actual width to your needs.

    And if you multiple table and only want to fix one, give the one in question an id:

    <table id="fixed_table">

    and then in the css, you could say:

    #fixed_table td {
      width: 50px;
    }
    

    and it would only affect tds in that particular table. Of course, if you wanted to affect some tables but not others, you would use a class instead of an id.

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

Sidebar

Related Questions

My asp.net site allows users to pick the theme they want from a list
I'm running a site that allows users to make comments, and most of them
I'm creating an site which allows users to upload photos. It's a linux server.
I'm working on a site that allows users to purchase digital content and have
I'm trying to set up a site which allows users to create their own
How can I generate a serial number users can use to register an application?
Am working on a site which allows users to participate in polls and earn
I have a userscript (read: my Javascript on someone else's site) that allows users
I have a site which allows users to make changes to content. How can
I'm creating a site that allows users to submit quotes. How would I go

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.