Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How could I pull this off?

Posted on 2011-02-25
6
Medium Priority
?
261 Views
Last Modified: 2012-08-13
Attached is a screen shot of a webpage I'm putting together. What I want to do is have the white section be "scroll-able" while the top and side navigation elements remain stationary.

At first I was thinking I could use frames, but then I stopped when I went back and realized that framing uses the whole browser and that's not what I'm doing here.

And that's when I thought that something in the context of a CSS approach could work and that's my question.

Could I use CSS to allow for one cell in a table to scroll while the other cells remain stationary? How would I do that? Screen shot of web design Screen shot of web design
0
Comment
Question by:brucegust
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 16

Expert Comment

by:SSupreme
ID: 34983616
You can use positioning and layering to complete your task, position:fixed for element you what to fix and upper layer.
0
 
LVL 4

Accepted Solution

by:
LAMASE earned 2000 total points
ID: 34983828
In other words you need to have only the central part scrollable, isn't it? Is the simplest thing and avoids you lot of problems with fixed positioning

If the central part is for example

<div id="main">
....
</div>

Open in new window


just simply use

#main {
height: 400px;
overflow: auto;
}

Open in new window


You  will need to adjust the height of the main div, (you have to do this even in the @Suppreme solution for the left bar), and you can do this with javascript (jQuery is a good choice)


P.S. However, in my opinion, you are cutting out some space for the user, just let him scroll and view the content in the whole page
0
 

Author Comment

by:brucegust
ID: 34983906
OK, so I've got a table with my nav bar on the left and my header up top with the portion of the screen that I want my user to scroll in the middle. If I've positioned my table in the middle of the screen, I'm thinking the cells within the table itself will adequately position things the way that I need them to appear.

So, that means that all I need to do is make the cells that harbor the navigation elements are assigned a fixed value while the cell that has the content - that's assigned a class scrolls, correct?

What I want to do is have the portion that scrolls have a scroll bar running along the side. I just don't want a huge white body of text running ad nauseam down the side of my screen. Can you see what I'm going for in your mind's eye? Does the "fixed" dynamic you suggested accommodate my vision, or am I barking up the wrong tree?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:SSupreme
ID: 34983983
0
 
LVL 4

Expert Comment

by:LAMASE
ID: 34984076
In this way you will have scrollbars along the entire page, not only the content part, keep in mind. Using a fixed height and overflow: auto; for the content you will have scrollbars only in that part: choose your favourite.
0
 

Author Comment

by:brucegust
ID: 34989288
Guys, I think we're poised on the threshold of great things, but even after a couple of hours of trying to make this work, I'm coming up short.

My code is attached. The area that I want to scroll is preface with <!-THIS IS THE AREA THAT I WANT TO SCROLL. EVERYTHING ELSE NEEDS TO REMAIN STATIONARY. HOW? -> It's the body graphic.

Your suggestions look positively accurate, but I'm having difficulty seeing how you would assign those properties to specific cells. Could you give me some example of how I would assign a particular cell in a table a property that keeps it in place while the content of another cell is scrollable?
<?php
require_once('artist_info.php');
require_once('header.php'); 
?>

<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (web_mockup.psd) -->
<table width=100%>
<tr>
<td>
&nbsp;<BR>
</td>
</tr>
<tr>
<td align="center">
	<table id="Table_01" width="1200" height="799" border="0" cellpadding="0" cellspacing="0" align="center">
	<tr>
	<td colspan="2">
	<?php require_once('satellite_top_nav.php'); ?></td>
	</tr>
	<tr>
	<td class="one">
		<table width="223" height="558" cellspacing="0" cellpadding="0">
		<tr>
		<td valign="top">
		<script language="JavaScript" type="text/javascript">
		AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
		'width', '223',
		'height', '372',
		'src', 'satellite_left_nav',
		'quality', 'high',
		'pluginspage', 'http://www.adobe.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'window',
		'devicefont', 'false',
		'id', 'satellite_left_nav',
		'bgcolor', '#ffffff',
		'name', 'satellite_left_nav',
		'menu', 'true',
		'allowFullScreen', 'false',
		'allowScriptAccess','sameDomain',
		'movie', 'satellite_left_nav',
		'salign', ''
		); //end AC code
		</script>
		<noscript>
			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" 
			width="223" height="372" id="satellite_left_nav" align="middle">
			<param name="allowScriptAccess" value="sameDomain" />
			<param name="allowFullScreen" value="false" />
			<param name="movie" value="satellite_left_nav.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="satellite_left_nav.swf" quality="high" 
			bgcolor="#ffffff" width="223" height="372" name="satellite_left_nav" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" 
			pluginspage="http://www.adobe.com/go/getflashplayer" />
			</object>
		</noscript>
		</td>
		</tr>
		<tr>
		<td valign="top"><IMG SRC="images/satellite_left_nav_bottom.jpg"></td>
		</tr>
		</table></td>
		<!-THIS IS THE AREA THAT I WANT TO SCROLL. EVERYTHING ELSE NEEDS TO REMAIN STATIONARY. HOW? ->
	<td rowspan="2" bgcolor="white" background="images/sliced_satellit_03.gif" width="977" height="560" ><!-this is your body graphic ->
	</td>
	</tr>
	<tr>
	<td><!-this is something random ->
	<img src="images/sliced_satellit_04.gif" width="223" height="2" alt=""></td>
	</tr>
	<tr>
	<td colspan="2">
	<!-this is your footer graphic ->
	<img src="images/sliced_satellit_05.gif" width="1200" height="30" alt=""></td>
	</tr>
	</table>
</td>
</tr>
</table>

</body>
</html>

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Suggested Courses

722 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