Solved

How could I pull this off?

Posted on 2011-02-25
6
254 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
  • 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 500 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to add loader animation to a page ? 2 40
Urgent Help with HTML CSS Positioning 9 41
Message not shown 5 30
move widget title down 4 6
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

911 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

21 Experts available now in Live!

Get 1:1 Help Now