Topic: How to fix a table's size? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24591" title="Pages that link to Topic: How to fix a table&amp;#039;s size? (Page 1 of 1)" rel="nofollow" >Topic: How to fix a table&#039;s size? <span class="small">(Page 1 of 1)</span>\

 
Arnitald
Bipolar (III) Inmate

From: Germany
Insane since: Apr 2004

posted posted 01-05-2005 17:54

I would like to stop my table from stretching... how to do that please?

kuckus
Paranoid (IV) Mad Librarian

From: Glienicke
Insane since: Dec 2001

posted posted 01-05-2005 18:12

Hi there,

you can use the width="" attribute of the <table> tag, e.g. <table width="400"> for a table with a width of 400 pixels.

Also have a look through http://de.selfhtml.org/html/tabellen/gestaltung.htm#breiten_hoehen

kuckus

Arnitald
Bipolar (III) Inmate

From: Germany
Insane since: Apr 2004

posted posted 01-05-2005 18:21

Thanks... I have just got Dreamweaver and this is what I have set... but if I type some long text in the only TD of the table, dreamweaver stretches the table... I have no idea why.

quote:
<table width="420" height="370">
<tr>
<td>BLAAAAAAAAAAAAAAAAAAAAAAAAA</td>
</tr>
</table>



That is the code... I don't what shall be more obvious....

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 01-05-2005 18:28

First of all, I know this is a test but, you should set the presentation properties in the appropriate layer, that is : in the CSS, not in the (X)HTML.

Have you tried to set the overflow property of your TABLE or its TD ? Otherwise you could use the max-width property but it requires a standard compliant browser ( read it doesn't work in IE ).

Arnitald
Bipolar (III) Inmate

From: Germany
Insane since: Apr 2004

posted posted 01-05-2005 18:33

I have tried it with styles in a CSS too... it was the same. Even when you type it in Notepad, it behaves the same... what would hint that setting the width is not enough...

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 01-05-2005 18:38

Have you tried what I said in my second sentence ? and in which browsers do you test your page ?

Arnitald
Bipolar (III) Inmate

From: Germany
Insane since: Apr 2004

posted posted 01-05-2005 19:12

IE6... and overflow displays scrollbars. I cant believe you cant fix a table to a pixel size... something's wrong...

Arnitald
Bipolar (III) Inmate

From: Germany
Insane since: Apr 2004

posted posted 01-05-2005 19:45

Ok I finally found the reason! Call that stupid... If you look up on the source, you'll notice that I tested with one long Blaaaaaaaaaaaaaaaaaaa, which obviously is one word and that can't be divided by the browser. But if you type short words like for example the Lorem Ipsum thingie... it will break on the spaces.

Well... who would have thought of that....



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu