Tables?

liunx

Guest
I have a table and set the cell width in pixels. when i enter text is stretches the width. how can i fix the width of the cell so it will take text and keep same width?<!--content-->Originally posted by Richcoleuk <br />
I have a table and set the cell width in pixels. when i enter text is stretches the width. how can i fix the width of the cell so it will take text and keep same width? <br />
Add a width to the cells.<br />
<br />
<TABLE height="100%" cellSpacing="0" cellPadding="0" width="100%" border="1"> <br />
<TR align="left" valign="top"> <br />
<TD width="50%" >This is some text This is some text This is some text This is some text This is some text This is some text</TD> <br />
<TD width="50%" >This is some text</TD> <br />
</TR> <br />
</TABLE><!--content-->also if i want to set the font for the entire page do i just put<br />
<br />
<font size="8" face="tahoma"> at the beginning?<!--content-->Originally posted by Richcoleuk <br />
also if i want to set the font for the entire page do i just put<br />
<br />
<font size="8" face="tahoma"> at the beginning? <br />
<br />
Like this: But size "8" is is pretty big text. Don't forget the closing tag.<br />
<font size="8" face="tahoma">Yout text here</font><!--content-->hi there<br />
<br />
Setting the font for the entire page:<br />
<br />
You could use a standard font tag right at the beginning, then close it right at the end or you could use the BASEFONT tag, e.g.<br />
<BASEFONT face="Verdana,Arial" size="2"><br />
This tag can go in the HEAD or at the beginning of a document right after the BODY tag.<br />
<br />
<br />
Table cell resizing - you have set a pixel width for a cell but the cell resizes when you enter text:<br />
<br />
If you are using a web editor e.g. Dreamweaver check that the 'No Wrap' box in unticked for that cell.<br />
<br />
Also, if you are specifying a narrow cell width check for long words in the text. A long word will force the cell width. You can reduce the font size, set a wider cell width in pixels or split the word with a hyphen if possible.<br />
<br />
<br />
Hope that helps<!--content-->Be advised that this is pre-1997 way of doing things. We are in 2003 now.<br />
<br />
Avoid using tables for page layouts.<br />
Avoid using <font> for font definitions.<br />
Avoid using <basefont>. Especially true because if you do not have a proper doctype, basefont may be neglected by some browsers.<br />
<br />
Use stylesheets instead.<br />
Tutorial: <!-- m --><a class="postlink" href="http://www.w3schools.com/css/default.asp">http://www.w3schools.com/css/default.asp</a><!-- m --><br />
CSS Layout: <!-- m --><a class="postlink" href="http://www.glish.com/css/">http://www.glish.com/css/</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html">http://www.thenoodleincident.com/tutori ... boxes.html</a><!-- m --><!--content-->....set the cell width in pixels. when i enter text is stretches the width.If you set the cell widths in, say, row 1 and the put text in row 4, the text will cause the cell to expand. To solve this, you need to specify the cell width for the specific <td> cell that contains the text.<br />
...set the font for the entire page...<br />
You should really use CSS for that.<br />
<br />
body { font:8pt Tahoma,sans-serif }<br />
td { font:8pt Tahoma,sans-serif }<br />
b { font-weight:bold } <br />
<br />
I assume you mean 8pt not size="8" (HTML max = '7'). Size '7' is probably 36pt. The additional CSS items are there for Netscape (if you care)<!--content-->
 
Back
Top