0

I have a table in HTML, which works fine in 1280 by 1024 resolution. If I change the resolution, the table increases according to the resolution.

The table height is 955px, width is 701px.

Is there a way to fix table to be the same size for all resolutions?

3
  • I can't possibly fathom why this would be needed. Not a criticism - I'd be really interested to know. May 14, 2009 at 7:31
  • Please tell me you are putting a ruler against the screen and saying "yes, this is correct!"
    – cjk
    May 14, 2009 at 7:39
  • These are indian programmers one on one. :)
    – User
    May 14, 2009 at 7:55

6 Answers 6

4

Use height and width in percentage instead of px. Using percentage will work for all higher and lower resolutions.

1

When you change your resolution, the table is not changing size, the size of your pixels are relative to your screen.

0

The "same size" - what units should that size be measured in?

0

You can't probably fix the table.

But you can fix it at the monitor. Many good monitors can remember X and Y scale the user has set for each particular resolution. So you go over all resolutions you use and you adjust the scale factor so that the table maintains its constant absolute size. You can use some measurement unit like they use in schools to assure precision.

The best solution is the simpliest one, right?

0

You may be able to get what you want through min-height and max-height CSS properties.

0

Using percentage for width and height of your <table> would be neat.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.