Hi
I want to add a sidebar to the right-hand-side of the body, but can't remember how to do it (i'm sure I have done this before). As I want the sidebar to appear in every topic, I thought it would be a case of editing the masterpage so that there is a sidebar div after the bodyproxy, and then restricting the width of the bodyproxy and adding floats. Didn't work out that way, though.
What's the best way to achieve this? I don't want to add anything unusual into the div, just a static image.
Sidebar within the body
-
- Sr. Propeller Head
- Posts: 153
- Joined: Wed Apr 04, 2012 3:39 am
- Location: The Midlands, UK.
- Contact:
Sidebar within the body
Craig Wright
Freelance Technical Author and SEO Copywriter
Midlands, UK
http://www.straygoat-technicalauthor.co.uk
Freelance Technical Author and SEO Copywriter
Midlands, UK
http://www.straygoat-technicalauthor.co.uk
-
- Senior Propellus Maximus
- Posts: 3671
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Sidebar within the body
I got this to work once but unfortunately can't find any notes about it! (My bad...)
I think you're on the right track, but I'm pretty sure you need to put the "sidebar" div above the body proxy, and then apply the float to the div not to the body proxy.
I think I also had to do some fiddling with the width of the "sidebar" div and the body proxy. I might have set the first to 20% and the second to 80%. I also recall having to fiddle to get the div to always be in view (was that a position attribute?) even if the user scrolled down within the topic, and also to include a scrollbar (was that the overflow attribute?) within the div if the user resized the window so it was shorter than the div.
Sorry that my memory is so dim. I hope I've given you some ideas nonetheless.
I think I found ideas at w3schools.com.
I think you're on the right track, but I'm pretty sure you need to put the "sidebar" div above the body proxy, and then apply the float to the div not to the body proxy.
I think I also had to do some fiddling with the width of the "sidebar" div and the body proxy. I might have set the first to 20% and the second to 80%. I also recall having to fiddle to get the div to always be in view (was that a position attribute?) even if the user scrolled down within the topic, and also to include a scrollbar (was that the overflow attribute?) within the div if the user resized the window so it was shorter than the div.
Sorry that my memory is so dim. I hope I've given you some ideas nonetheless.
I think I found ideas at w3schools.com.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Sidebar within the body
If you're floating the sidebar to the right of the body content, then it needs to come before the body proxy.
Note that the body content isn't put inside a container itself, it's just placed in front of the elements in the body; so in the output, the body content will be able to flow around the sidebar.
However, if you want body and sidebar to appear as two separate columns, then put the body proxy inside a div too (so it doesn't flow around the sidebar).
Note that the body content isn't put inside a container itself, it's just placed in front of the elements in the body; so in the output, the body content will be able to flow around the sidebar.
However, if you want body and sidebar to appear as two separate columns, then put the body proxy inside a div too (so it doesn't flow around the sidebar).
-
- Sr. Propeller Head
- Posts: 153
- Joined: Wed Apr 04, 2012 3:39 am
- Location: The Midlands, UK.
- Contact:
Re: Sidebar within the body
Thanks, both.
I will give that a go.
I'm still working with a developer to do all these changes from a script, so will post the results when I can.
I will give that a go.
I'm still working with a developer to do all these changes from a script, so will post the results when I can.
Craig Wright
Freelance Technical Author and SEO Copywriter
Midlands, UK
http://www.straygoat-technicalauthor.co.uk
Freelance Technical Author and SEO Copywriter
Midlands, UK
http://www.straygoat-technicalauthor.co.uk
Re: Sidebar within the body
I don't think you'd need a script, these are things you can just set up in the master page.straygoat wrote:Thanks, both.
I will give that a go.
I'm still working with a developer to do all these changes from a script, so will post the results when I can.
-
- Sr. Propeller Head
- Posts: 153
- Joined: Wed Apr 04, 2012 3:39 am
- Location: The Midlands, UK.
- Contact:
Re: Sidebar within the body
True, unless I want the sidebar to refresh with different images etc.
Craig Wright
Freelance Technical Author and SEO Copywriter
Midlands, UK
http://www.straygoat-technicalauthor.co.uk
Freelance Technical Author and SEO Copywriter
Midlands, UK
http://www.straygoat-technicalauthor.co.uk