CSS frame scroll

42 views
Skip to first unread message

f7o7

unread,
Feb 5, 2007, 1:34:29 PM2/5/07
to TiddlyWiki
I split my TiddlyWiki to two CSS frames and the contents frame does
not scroll to position a tiddler in view.
Please try this on an empty TW to see what I mean.
Replace PageTemplate with the one below. Open a few tiddlers so the
scroll bar appears and the GettingStarted tiddler is pushed beyond the
visible area. Now click on the Getting Started in Main Menu, and
nothing happens. The frame does not scroll to bring Getting Started
into the visible area. Can this be fixed?

<style type="text/css">
.header {
position:fixed;
top:0;
width:100%;
background:[[ColorPalette::TertiaryPale]];
padding:0 0 .5em;
border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;
}
.contents {
position:fixed;
top:120px;
bottom:0px;
width:100%;
overflow:auto;
}
</style>
<!--{{{-->
<div class='header' macro='gradient vert
[[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></
span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></
span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></
span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></
span>
</div>
</div>
<div class='contents'>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></
div>
<div id='sidebarTabs' refresh='content' force='true'
tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
</div>
<!--}}}-->

Jeremy Ruston

unread,
Feb 6, 2007, 12:37:13 PM2/6/07
to Tiddl...@googlegroups.com
> nothing happens. The frame does not scroll to bring Getting Started
> into the visible area. Can this be fixed?

The existing core code only knows how to scroll the document itself
into view. I think you'd need to change the Scroller() object to also
take into account your new scrolling area.

Cheers

Jeremy


--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com

f7o7

unread,
Feb 6, 2007, 4:31:06 PM2/6/07
to TiddlyWiki
> I think you'd need to change the Scroller() object to also
> take into account your new scrolling area.

D-o-h! Can't someone else do it? :)

I loaded up the SiteSubtitle by moving some items from the sidebar and
adding a few of my own. So I thought I'd keep that and the horizontal
Main Menu always visible. Hope someone finds the idea good enough to
take up.

Thanks.


Reply all
Reply to author
Forward
0 new messages