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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange problem with cell width

Status
Not open for further replies.

tnsbuff

Technical User
Jan 23, 2002
216
US
Hi,

This seems like it should be incredibly simple, but for some reason I'm having trouble forcing a cell width.

I have a table with the width :) set to 73%. I have a line for
Name: ...
Phone 1: . . .
Phone 2:
E-Mail: ...

Of course, the actual name, phone #'s and email (not the titles) don't line up exactly perfectly just using non-breaking spaces so I put the titles( Name: Phone 1:, Phone 2:, and E-Mail:) into a cell and the actual name, phone and email in another cell next to it forcing things to line up perfectly.

The problem is that it leaves too much gap between the titles in the first cell and the text in the 2nd cell. I've tried setting the first cell's width to around 75, but it doesn't seem to have any effect.

You can see what I'm talking about here (I put a faint border around the cells so you can see what's I'm talking about):


Any suggestions appreciated!
 
get rid of the <BR>'s
<tr><td><b>Phone:</b></td>
<td>(314) 616-4321</td>
</tr> You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
Thanks onpnt, but that doesn't seem to solve the problem. Any other suggestions?

 
it solved the gap height issue you have there,

seeing as you state your table in percentage you need to adjust the td's also in this manner here
<tr><td width=&quot;5%&quot;><b>Phone:</b></td>
<td>(314) 616-4321</td>
</tr>
<tr><td width=&quot;5%&quot;><b>Fax:</b></td>
<td valign=&quot;top&quot;>(636) 536-2370</td>
</tr>
<tr><td width=&quot;5%&quot;><b>Email:</b></td>
<td><a href=&quot;mailto:gvanhouse@physician-strategies.com&quot;>
gvanhouse@physician-strategies.com</a></td>
</tr>
<tr><td colspan=&quot;2&quot;><br>
. . . or complete the form below
and we will contact you.</td>
</tr>
</table> You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
Personaly i don't like to use percents in windows, unless i know the size she is going to have.

What i can advise you is to do is put a width of 95% in the bigger cell

but, there's a problem, with relative sizes, if the resolution changes, the table changes. I advise you to englobe the table in a fixed width, and then align it in the center.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Anikin, this table is centered and text is hard coded into the table as stated above making the use of percentages alright if you ask me. also it must have either been tested in all resolutions or just got lucky because I did that before attempting to adjust the problem section.

I do agree and understand what your saying but I think if you look at the site in reference it really doesn't make a large difference here You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
The problem of the resolution is always a problem. That's why, well at least here in Portugal we devellop for 800x600.

Don't forget one thing in HTML. When you put a width in a cell, you mean &quot;at least&quot; and not exactly.

I tryed you code and i found that with a width arround 90-100 (in the smaller) could provide you the efect you want. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Thank you both! I think I've got it worked out.

What I did was create a fixed width table inside the larger relative one. I had tried that originally, but I had only specified the width for the first cell and not for both. Apparently that is what was preventing it from shrinking up the left cell as much as I needed.

Thanks again!

If you're interested, ;-) I have several other challenges I'm working on. See other posts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top