Force Table Width and height

Is there a way to FORCE a table to be a certain height and width, regardless of what information is in there ?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Irwin SantosComputer Integration SpecialistCommented:
<table width="725">
<td width="1">
<img src="graphicimage600pixelinheight1pixelinwidth.gif">
information goes here
Irwin SantosComputer Integration SpecialistCommented:
image info...

graphic image 600 pixel in height 1 pixel in width

interchange 725 for width to whatever width you want


create a graphic image (600) in height or whatever you wish
milkmon123Author Commented:

What I meant was to contrain it - so if there is too much information, it doesn't make the table higher than it should be....

so, <table width='200' height='250'><tr><td> hello<br><br><br><br>there<br><br><br>hello<br><br></td></tr></table>

... this makes the table height more like 400 - but I want it to be FIXED at 250, so the text just doesn't display past 250 height.

Any ideas ? - I think there is something like 'fixed' or whatever in the style but I can't remember.

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

milkmon123Author Commented:
it's all gone quiet.....
You can't set height on your table properties, but you can get around that by adding a div tag inside your td:
<style type="text/css">
table#yourtable div{
      width: 100px;
      height: 100px;
      overflow: hidden;
      border: 1px solid red;}

<table id="yourtable">
                  <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Good Luck!


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
milkmon123Author Commented:
Brilliant - thanks !

milkmon123Author Commented:
Now I have a problem....

I need to link these two questions together....

I need to use the float:left; style thing with the overflow: hidden; thing -

Basically, I need to display a screen of products - and if the screen is expanded or contracted, the products must arrange themselves....

float:left does this - but the tables aren't always the right height - so this poses a problem.

I want to use float:left, but force the tables to be the same height / width, regardless of info - please help !!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.