layer position and scrollbar
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Dreamweaver Training and help » Layer Position and Scrollbar on a table

Layer Position and Scrollbar on a table

The UK's most regular instructor-led training courses.
Training information: dreamweaver training in london · Dreamweaver training · Adobe dreamweaver training

resolvedResolved · Medium Priority · Version CS3

Layer Position and Scrollbar on a table

Duncan has attended:
Dreamweaver 8 Introduction course
Dreamweaver 8 Intermediate course

by - delegate Duncan bronze contributer[25 posts] (2008 Jul 2 Wed, 17:00) replyReply

Hello
two probs. 1. I have made my index page (www.therollingimage.com) using a table, the news part is a layer with an iFrame. I really wanted all of my content in the middle of the screen, but if i centralise the table, and manually move the layer then the layer will not be in the same place on a smaller screen. So how do i make its position relative to the table location?

And No.2, (and this is really simple but i've totally forgotten) if i'm putting text straight in to a table (450px high) how do i add a verticle scroll bar to the table so the viewer scrolls the table text as opposed to the entire page?

Thanks

Duncan

Dreamweaver 8 Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
8 2009 Jan 20 Tue Bloomsbury 8 book now £175 £225
8 2009 Apr 24 Fri Bloomsbury 8 book now £175 £225
8 2009 Jul 15 Wed Bloomsbury 8 book now £175 £225
8 2009 Aug 28 Fri Bloomsbury 8 book now £175 £225
8 2009 Oct 6 Tue Bloomsbury 8 book now £175 £225

RE: Layer Position and Scrollbar on a table

by - trainer Rich platinum contributer[744 posts] (2008 Jul 5 Sat, 20:25) replyReply

Hi Duncan,

1) You're using Absolute Positioning for all your layers. So you'll need to either let the layers sort themselves out, or use table layout.

DIV layout: set your body definition to be text align Center (will centre everything in body). Then have a div, but set text align to be Left. This is a standard method that may work for you. See example below:

<html>
<head>
<style type="text/css">
<!--
body {
text-align: center;
}
#maincontent {
text-align: left;
width: 600px;
background-color: red;
}

-->
</style>
</head>

<body>
<div id="maincontent">This is main content
<iframe height="200" width="200">Whatever</iframe>
</div>
</body>
</html>


Table layout: have a 1 celled table at 100% width and height.
eg.

<table width="100%" height="100%"><tr><td>
ALL YOUR STUFF INCLUDING OTHER TABLES IF REQUIRED
</td></tr></table>


The first method is recommended but i would recommend testing in all browsers.

2) I must admit I've never needed to scroll just a table cell. Anyway, I found a way to do it with CSS. Here is the sample code:

<html>
<head>
<title>table with scroll</title>
<style type="text/css">
<!--
DIV{
text-align : left;
padding : 5px;
width : 100%;
height : 4em;
overflow: auto;
}
-->
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="1">
<thead>
<tr>
<th>stuff in the thead</th>
</tr>
</thead>
<tfoot>
<tr>
<th>stuff in the tfoot</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>
<div>scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
scroll stuff in the tbody<br>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>


Let me know how you get on.

Regards, Rich

Source: http://allmyfaqs.net/faq.pl?Scrolling_table_cell

RE: Layer Position and Scrollbar on a table

by - delegate Duncan bronze contributer[25 posts] (2008 Jul 9 Wed, 17:24) replyReply

Hi Rich
The second one should work ok. One thing though, when i stick in a lot of text two scroll bars appear side by side. If i remove half of the text one disappears. Try this, then remove half and see if the same happens.


<html>
<head>
<title>table with scroll</title>
<style type="text/css">
<!--
DIV{
text-align : center;
padding : 5px;
width : 100%;
height : 400px;
overflow: auto;
}
-->
</style>
</head>
<body>
<table width="600" height="600" border="1">
<tr>
<td height="73">&nbsp;</td>
</tr>
<tr>
<td><div>
<div>blah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblalahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blblahblblah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblalahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blblahblah ahlahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblalahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blblahblblah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblalahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blblahbla </div>
</div></td>
</tr>
<tr>
<td height="25">&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>


Does it have anything to do with this?

DIV{
text-align : center;
padding : 5px;
width : 100%;
height : 400px;
overflow: auto;
}

Thanks
Duncan

RE: Layer Position and Scrollbar on a table

by - trainer Rich platinum contributer[744 posts] (2008 Jul 15 Tue, 09:08) replyReply

Duncan,

It's cause you've got two div tags, one nested inside the other.

<div><div></div></div>

Remove the middle two and it works.

And yes, it's to do with the CSS (redefining the DIV tag). If you wanted the two div tags to stay (for other style reasons), then you could make your own style up like this:

#scrollme {
text-align : center;
padding : 5px;
width : 100%;
height : 400px;
overflow: auto;
}

First div to scroll:

<div id="scrollme"><div>blah blah</div></div>

Second div to scroll:

<div><div id="scrollme">blah blah</div></div>

Hope that makes sense? If not, experiment a little, then get back to me.

Regards, Rich


Related articles

· Learn How to Build Complete Websites in Three Days
· Which Is Best: Training Dreamweaver Personnel Or Contracting for Web Design?
· The Importance of a Professionally Designed Website
· Six Reasons to Outsource Dream Weaver Training
· Advantages Of Using Dream Weaver To Design Web Pages

Please browse our web site to find out more about
dreamweaver training in london and other Microsoft training courses.

Dreamweaver tip:

Viewing you page in the browser

If you are working in design view you can quicky preview your webpage by pressing the F12 key

View all Dreamweaver hints and tips

Rate this page:
3.5/5 (2 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz