• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:

scrollable table cell

I have web pages that all have the same table structure, there are just two cells: a picture in the top cell and a description in the bottom cell. I want the bottom cell to always be the same, specific height. But on some bottom cells, the description will exceed the cell's capacity, causing that cell to expand. Is it possible, using either Dreamweaver CS3 or just straight HTML or some other scripting language, to set it so that if the content exceeds the cell capacity, the cell will not expand and will just offer a scroll bar instead?
1 Solution
Kiran Paul VJComputer EngineerCommented:
add a div inside the cell and give style="overflow-y:auto;"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<table width="100%" height="84" border="1" cellpadding="10" cellspacing="0">
    <td height="41"><div style="height:41px;overflow-y:auto;">sdfsdfsd<br />sdfsdfsd<br />erwesdfsd<br />wersdfsd<br />werdfsd<br />sdfsdfsd<br />sdfsdfsd<br /></div></td>
    <td height="41">&nbsp;</td>
Better use "overflow:auto;" instead, since overflow-x and overflow-y are not so well supported throughout browsers yet. Of course, with overflow:auto, the browser will put both the horizontal (overflow-x) as well as the vertical (overflow-y) sliders on some occasions. Whether this is what you want or not, is not clear (but I just wanted to point this out)

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now