Forum:How to make template fields several lines high without explicit br?

For example, see this page, the unit template. Text in one of the fields ("Unique") is far longer than can fit into template's length. That makes texts of first column, which consist of several words, squish and become several lines high. That doesn't look beautiful, so is there any way from stopping text squish (first column)? I can explicitly write  every few words in long text, but that doesn't seem like a nice solution to me. Any help appreciated. voice (talk) 12:13, October 15, 2012 (UTC)


 * In your template (w:c:eon:Template:Unit), the code that makes a single row looks like this:




 * You can explicitly set the height of a row using CSS:


 * - style="height:44px"

's everywhere.
 * ^If you did that for all of the rows, it would make each of those rows have a minimum height of 44px on every page the template is used. You could improve upon that by making a "height" parameter for the template. That way if you want to set the height on a particular page, you can do so manually, which is a bit easier than putting


 * - style="height:"


 * This isn't the best solution maybe, but it's the simplest one I can think of off the top of my head that can adapt to varying heights. If you know ahead of time that ALL pages that use the template will never have more than 2 lines of text per row, you can use a fixed height value like "44px". But if the height would be different on different pages, you need the height parameter (or something similar).


 * What you want is to give the left column cells an explicit width that will force it to be as wide as you want and prevent the line-breaking. Tables are a pain with this, though. Tables don't obey widths and heights properly, treating them as suggestions rather than demands. If it doesn't work, stick " " on the table tag, but be aware that that will lock all of the table's widths so it won't grow wider on its own any more at all, that can cause other problems when you use long words that won't fit in its column properly (over-long words will spill [overflow] into adjacent columns, or out of the infobox, like they would in a fixed width DIV or any other element). Lunarity 03:27, October 16, 2012 (UTC)