kumar
kumar

Reputation: 1137

How to fix a HTML table to a specific size

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?

Upvotes: 0

Views: 2956

Answers (6)

vurquee
vurquee

Reputation: 491

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

Upvotes: 0

Tim
Tim

Reputation: 4099

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

Upvotes: 0

User
User

Reputation: 30995

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?

Upvotes: 0

Daniel Earwicker
Daniel Earwicker

Reputation: 116764

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

Upvotes: 0

JeremyWeir
JeremyWeir

Reputation: 24398

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

Upvotes: 1

Samiksha
Samiksha

Reputation: 6192

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

Upvotes: 4

Related Questions