Absolute position on relationship tables

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
esangregory
Propeller Head
Posts: 13
Joined: Thu Jul 09, 2009 12:00 pm
Location: Dayton, OH

Absolute position on relationship tables

Post by esangregory »

In my HTML Help project, I have created a relationship table as a sidebar that floats to the right side of the screen. It works like a charm; however, I have some rather long topics that require scrolling, and of course the sidebar scrolls up with everything else. This is a problem because it contains related links that users might want to access when they are looking at info at the bottom of the topic.

I was thinking about using absolute positioning to try to keep the sidebar stationary while the rest of the topic content scrolls. I was wondering if anyone else has tried this approach with success? I'm just a little nervous that my project will explode if I don't do it right.

Also, in some topics, the number of links in the relationship table extends "below the fold." I am concerned that using absolute positioning would prevent users from ever seeing the bottom of the sidebar. In such a case, would the sidebar automatically have its own scrollbar? If not, would it be possible (or difficult) to hard-code a scrollbar? Or would it just behave and look too clunky to have a separate scrollbar on a sidebar?

Perhaps someone out there has come up with another alternative for this sort of situation?
Erin

"If the English language made any sense, a catastrophe would be an apostrophe with fur." ~Doug Larson
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Absolute position on relationship tables

Post by DurtyMat »

hey, i dont know if you found a solution to your issue, but you could do something like this:

in your masterpage, add something like this in your <body> tags:

Code: Select all

		<div style="float:left; width: 75%;">
		<MadCap:bodyProxy /></div>
		<div style="position: fixed; width: 22%; top: 30px; right: 0px;">
		<MadCap:relationshipsProxy class="" /></div>
after adding that, modify the relationshipsProxy in the css to have a border and a background color, when the user scrolls, the relationship table will move with it, and the content will overlap anything it scrolls over without causing any issues. i just implemented something similar and pretty happy with the results.
Flare: I bought it ... so that means I can break it, right?
Kathy_123
Propeller Head
Posts: 39
Joined: Thu Oct 04, 2012 9:40 am

Re: Absolute position on relationship tables

Post by Kathy_123 »

This is a great feature.

One thing I haven't figured out is if the relationship table is longish how to get it to scroll too. Is there a way to set scrolling for the table? (I thought I found a way -- but it didn't work.)
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Absolute position on relationship tables

Post by Nita Beck »

Kathy_123 wrote:One thing I haven't figured out is if the relationship table is longish how to get it to scroll too. Is there a way to set scrolling for the table? (I thought I found a way -- but it didn't work.)
I got this to work for a project awhile back. Don't exactly remember how, but I think I used a div and set its overflow property to scroll.

Hope this gives you enough to go on. I don't have Flare open at the moment and am going on memory.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Absolute position on relationship tables

Post by Nita Beck »

Kathy: Yep, it's the overflow property. Set it either to scroll (for horizontal and vertical scrollbars) or to auto (for a vertical scrollbar only). If there are more relationship links than can fit in the space you've provided, you'll get a scrollbar. Check this out: http://www.w3schools.com/cssref/pr_pos_overflow.asp.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Kathy_123
Propeller Head
Posts: 39
Joined: Thu Oct 04, 2012 9:40 am

Re: Absolute position on relationship tables

Post by Kathy_123 »

Thank you Nita!

Turns out this solution doesn't quite work for me but I think I'm ok with what I have.

Not sure if I can explain this well but it seems that because the relationship table is within the window that scrolls, the relationship table doesn't seem to have any realization that the window isn't big enough to show it. What I was hoping for is that the table itself could sense that the window wasn't big enough. So in all cases I can find in my current project, scrolling the window itself is getting me to the bottom of the list in the relationship table. So maybe I was looking for a solution for which there was no problem!

I did find a few problems with using auto, either on the master page or in the CSS for the relationship table. It didn't ever show, because the table is always (automatically) big enough. I guess if I forced its size to being smaller the scroller would show.
Also, when I tried scroll, artifacts of the scroll bars showed on pages with no relationship table. Kinda weird.

Anyway, it's great to have your help and I appreciate it.
Post Reply