scrollable table cell

Posted on 2007-10-14
Last Modified: 2008-01-09
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?
Question by:john8217
    LVL 16

    Accepted Solution

    add a div inside the cell and give style="overflow-y:auto;"

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <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>
    LVL 7

    Expert Comment

    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)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now