Skip to Content
Former Member
Mar 01, 2004 at 07:23 PM

Problem with FormLayoutCell Width (EP602)



I have a question regarding setting the width of a FormLayoutCell:

If the width of a <i>FormLayoutCell </i>is set to a width in pixels, the width is not rendered correctly in the browser. If the width of the parent <i>FormLayout </i>is set, the width of the cell is set correctly.

My investigations have shown that for the cell in the HTML code the width is set with the style attribute (e.g. <td style="width:150"> ). The width of the layout is set with the "width" attribute of the "table" tag (e.g. <table width="500"> ). Setting the width of the FormLayout can be a workaround in some cases (even so it is not very nice), but the problem I have found here is that the cells which have not a widht set are distributed more or less evenly over the remaining size of the table. This is very ugly.

The best solution I have found so far, is to set the style sheet attribute <b>table-layout</b> to <b>fixed </b>(eg. <table style="table-layout:fixed"> ). This works very well and seems to be the clean way. Unfortunately I couldnt find a way to set this in the FormLayout API.

Due to the fact that the FormLayout is <b>THE </b>HTMLB layout I guess that I share my problem with other developer. So, I would be glad for any ideas.