Click to See Complete Forum and Search --> : fixed table cell size


ketanco
11-27-2008, 01:47 PM
Hi,
I have a table that I am displaying as a calendar. I want all the cell sizes to be fixed width and height no matter how long one cell might contain alonger than usual text. Is it okay if that entry does not apear for that cell. I specified certain width and height for the table tr and td but although the width seems to be fixed, the height still adjusts itself dynamically (even though I specified a height) if that cell's text is long. How can I ensure fixed cell width and height?

javawebdog
11-27-2008, 02:35 PM
Quick fix: In each td place a <div class="calcell"></div>, then add to your <style> div.calcell{width:[your value];height:[your value];overflow:auto;}. Most browser will support width as a percentage if you wish, but height often requires a fixed number in px. The overflow will add a scroll bar as needed while maintaining the cell dimensions.