Solved

CSS Vertical scroll bar, on load=bottom

Posted on 2009-07-01
1
626 Views
Last Modified: 2012-05-07
Good afternoon,
Ive written a simple CSS layout to try out an idea, which all seems to work, apart from I need the div divDetail to scroll to the last line.

Ive got a feeling I need to use javascript, but have no idea even where to start. I have searched google, but without completly re-writing the scroll bar component (which I dont reall want to do), I cannot see a way to solve this problem.

Any ideas?
CSS:-
	body{		
		margin: 0;
		background-color:#FFFFFF;
		color: #666666;
		FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif;
		text-align: center;
		}
 
		
	#divContent
		{
		width: 980px; /*Width of main container*/
		height: 580px;
		border:1px solid #FF0000;
		}
	#divTitle
		{
		width: 970px; /*Width of main container*/
		height: 150px;
		border:1px solid #FF0000;
		}
	#divMenu
		{
		width: 970px; /*Width of main container*/
		height: 30x;
		border:1px solid #FF0000;
		}
	#divBody
		{
		width: 970px; /*Width of main container*/
		height: 100px;
		border:1px solid #FF0000;
		}
	#divDetailTitle
		{
		width: 970px; /*Width of main container*/
		height: 30px;
		border:1px solid #FF0000;	
		}
	#divDetail
		{
		overflow-y:auto;
		width: 970px; /*Width of main container*/
		height: 100px;
		border:1px solid #FF0000;
		}
	#divDetailMenu
		{
		width: 965px; /*Width of main container*/
		height: 30px;
		border:1px solid #FF0000;
		}
	#divDetailActions
		{
		width: 965px; /*Width of main container*/
		height: 90px;
		border:1px solid #FF0000;
		}
 
 
HTML:-
	<HTML>
	<HEAD>
	<title>CSS Test</title>
	<link href="cssStyle.css" rel="stylesheet" type="text/css" />
	</HEAD>
	<BODY>
	<div id="divContent">
		<div id="divTitle">Title</div>
		<div id="divMenu">Menu</div>
		<div id="divBody">
			<div id="divDetailTitle">Detail title</div>
			<div id="divDetail">Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail<BR>Detail</div>
			<div id="divDetailMenu">Menu</div>
			<div id="divDetailActions">Actions</div>
		</div>
	</div>
	</BODY>
	</HTML>

Open in new window

0
Comment
Question by:tonelm54
[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
1 Comment
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
ID: 24753360
Put some element with id="detailBottom" at the bottom of "divDetail". Then link to the page with something like:

<a href="page.html#detailBottom">Page</a>
0

Featured Post

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

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

734 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