www.webdeveloper.com
Results 1 to 2 of 2

Thread: innerHTML not expanding page

  1. #1
    Join Date
    Sep 2009
    Posts
    172

    innerHTML not expanding page

    All,
    I have the following code:
    Code:
    <li onclick="javascript:showdesc('This is info about trucking', 'truck');">Trucking</li>
    <div id="trucking"></div>
    <li onclick="javascript:showdesc('This is info about bulk delivery', 'bulk');">Bulk Delivery</li>
    <div id="bulk"></div>
    Which calls the following function:
    Code:
    function showdesc(desc, type){
    if(type=="truck"){
    document.getElementById("trucking").innerHTML = desc;
    }
    if(type=="bulk"){
    document.getElementById("bulk").innerHTML = desc;
    }
    }
    This all works good, however when I click on some of these it just moves the text down the page but it doesn't expand the column and the text at the bottom just gets pushed down past the page. I'm using Chrome. Any ideas?

  2. #2
    Join Date
    Oct 2006
    Posts
    939
    You may need to set CSS of line-height and/or add another argument to the function to set style of height

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles