Richcoleuk
03-20-2003, 04:21 PM
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?
|
Click to See Complete Forum and Search --> : Tables? Richcoleuk 03-20-2003, 04:21 PM 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? jdavia 03-20-2003, 04:33 PM Originally posted by Richcoleuk 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? Add a width to the cells. <TABLE height="100%" cellSpacing="0" cellPadding="0" width="100%" border="1"> <TR align="left" valign="top"> <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> <TD width="50%" >This is some text</TD> </TR> </TABLE> Richcoleuk 03-20-2003, 04:34 PM also if i want to set the font for the entire page do i just put <font size="8" face="tahoma"> at the beginning? jdavia 03-20-2003, 11:28 PM Originally posted by Richcoleuk also if i want to set the font for the entire page do i just put <font size="8" face="tahoma"> at the beginning? Like this: But size "8" is is pretty big text. Don't forget the closing tag. <font size="8" face="tahoma">Yout text here</font> Beauchamp 03-21-2003, 12:42 PM hi there Setting the font for the entire page: 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. <BASEFONT face="Verdana,Arial" size="2"> This tag can go in the HEAD or at the beginning of a document right after the BODY tag. Table cell resizing - you have set a pixel width for a cell but the cell resizes when you enter text: If you are using a web editor e.g. Dreamweaver check that the 'No Wrap' box in unticked for that cell. 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. Hope that helps nkaisare 03-21-2003, 12:48 PM Be advised that this is pre-1997 way of doing things. We are in 2003 now. Avoid using tables for page layouts. Avoid using <font> for font definitions. Avoid using <basefont>. Especially true because if you do not have a proper doctype, basefont may be neglected by some browsers. Use stylesheets instead. Tutorial: http://www.w3schools.com/css/default.asp CSS Layout: http://www.glish.com/css/ http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html Nedals 03-21-2003, 01:20 PM ....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. ...set the font for the entire page... You should really use CSS for that. body { font:8pt Tahoma,sans-serif } td { font:8pt Tahoma,sans-serif } b { font-weight:bold } 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) webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |