Solved

web page, left navigation <td> with scolling center-content <td>

Posted on 2009-07-01
7
557 Views
Last Modified: 2013-12-25
What html code do I use to create the left-navigation with scrolling-center-content functionality in a web page.  I have illustrated what I am looking for below using a <table> but it just makes one, big, unified web page.  Thanks.

<table>
  <tr><td colspan=2>This is my header cell</td></tr>
  <tr>
     <td> This is my left-navigation cell  </td>
     <td>  center-content cell.  This should scroll independently, of left-nav and header  /<td>
   </tr>  
</table>
0
Comment
Question by:pdschuller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:alexpercsi
ID: 24758291
When you want something to scroll you need to put its content in a div tag, set a fixed width and/or height
on the div tag, and set the overflow property depending on how you want to display the scrollbars.

Read more about the overflow CSS property here:
http://www.w3schools.com/Css/pr_pos_overflow.asp

In your code you could do it like this:
<table>
  <tr><td colspan=2>This is my header cell</td></tr>
  <tr>
     <td> This is my left-navigation cell  </td>
     <td>
         <div style="width:500px;height:500px;overflow:auto;">center-content cell.  This should scroll independently, of left-nav and header  
        </div>
      </td>
   </tr>  
</table>

Open in new window

0
 

Author Comment

by:pdschuller
ID: 24758555
That might be just what I need since I cant use FRAMES.  

I will check it out in the morning.  Thanks.
0
 
LVL 7

Expert Comment

by:alexpercsi
ID: 24758628
The only setback is that you CANNOT use relative widths and heights (e.g. 100%).
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:pdschuller
ID: 24762861
Thanks.  That is really getting me closer to what I want.  However, that produces two vertical scroll bars and I want only one.  The two scroll bars are:  one for the center-content div and one for the web page as a whole.  I can make the scroll bar for the web page as a whole go away if I make the height for the center-content div short, but that is not acceptable cause it would restrict the user too much.  What I want looks like this: there is one vertical scroll bar at the right edge of the browser window and that controls the scrolling in the center-content div.  The header/banner and the left navigation areas stay still.
0
 
LVL 7

Accepted Solution

by:
alexpercsi earned 500 total points
ID: 24763017
you can always force the page scrollbar to disappear. try adding style="overflow:hidden" to the body tag and see if it helps.
0
 

Author Closing Comment

by:pdschuller
ID: 31598966
I'm impressed.  Now it does what I wanted it to do.  It probably seems obvious to you but it would have taken me a long time time figure that out.  Thanks.
0
 
LVL 7

Expert Comment

by:alexpercsi
ID: 24767875
It's something I've worked with quite a bit, quite a common question around the workplace as well :). I'm glad I could help.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

617 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