Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Horrible Tables!!

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
0
0
AAAAAAAAAAAAAAAAAAAAAAAH!!! i realy hate tables. why dont they just do as i ask!

i have a page, there are 3 columns and a few rows. the 2 outer columns have a size and the inner column doesnt, logically this should mean that the 2 outer columns always stay the same size and the inner column auto resizes as nessesary just like with frames. exept it isnt ! its giving me a hard time instead :( I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Are you defining the <td> width in pixels or as a percentage? Also, did you set the width of the table? Post your code and maybe we can help.
 
iv solved it now by adding an empty gif pixel and setting the size to 100% :) this pushes the middle table out and fills it nicely.

still... when is ther going to be a table v.2 :)

befor the gif pixel idea i had the 2 outer <td>'s set with a pixel size (the size of the pic in the background of this td) and i had tried to give the middle td no size at all, thinking it would auto resize. but it didnt. and if i gave it a pixel size it resized but when i shrunk the browser window the outer td's resized.

anyways its working now with the empty gif in it at 100% width.

thanks,

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
The width attribute of the <td> is deprecated in favor of style sheets. I think they consider this the version 2. Glad you were able to fix your problem. :)
 
me to :)

thanks,
thomas I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
nobody has to do anything :) but it is possible, i didnt, i just made the td stay the proper size by putting a transparent 1 pixel gif in the td and setting the gif size to 100%. so it would constantly push the td out to maximum size. this is all sounding very complicated isnt it :S awell :) I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
That's one way of doing it, but you shouldn't need to. Did you specify an overall width for the table? Unlike frames, tables don't have to fill the whole width of the screen, so they won't do unless you tell them to. This table will have the &quot;problem&quot; you describe:

Code:
<table border=1><tr>
<td width=100>little</td>
<td>big?</td>
<td width=100>little</td>
</tr></table>

This one won't:

Code:
<table border=1 width=&quot;100%&quot;><tr>
<td width=100>little</td>
<td>big?</td>
<td width=100>little</td>
</tr></table>

simple eh?

By the way, you need to make sure there's something in each of the cells (other than spaces), a
Code:
&amp;nbsp;
or a tiny gif will do in an otherwise empty cell. -- Chris Hunt
Extra Connections Ltd
 
i had the second one, but the &quot;big&quot; td had nothing in it, when i put the gif in it it worked :) I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top