Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout Template Wishlist RSS
[DokuWiki Template] Position the sidebar as Fixed
There are some problems then, with responsiveness etc.
Avatar
sancaya #1
Member since Aug 2013 · 37 posts · Location: Vnukovo
Group memberships: Members
Show profile · Link to this post
Subject: [DokuWiki Template] Position the sidebar as Fixed
Many people think that, while DokuWiki Template is maybe the best, it could be a greatest addition if the sidebar could stay on its place, not scrolling with the content.
I found that it can be easily done with position:fixed, but then some problems arise.

1. I start my sidebar text with
<WRAP round white pad24 narrow fixed>
where class "fixed" is defined as
.wrap_fixed {
    position:fixed;
    left:-16px;
    bottom:-16px;
    overflow: auto;
}
So I get this:
[Image: https://forum.dokuwiki.org/forum.php?req=thread&download=40035&inline=1&key=9179B0EC]
As you see there is some space, more than needed, between the sidebar and the content field.
The content field width is calculated with full sidebar width.
I'd like to take into account the (negative in this case) positioning of the sidebar relatively to the left side of the window.
So that there will be no unneeded space in between.

=to be continued=
The author has attached one file to this post:
sidebar-1.jpg 124.8 kBytes
You have no permission to open this file.
This post was edited on 2013-08-16, 12:54 by sancaya.
Avatar
sancaya #2
Member since Aug 2013 · 37 posts · Location: Vnukovo
Group memberships: Members
Show profile · Link to this post
2. The second problem appears with responsiveness. When the screen is too small relatively to the text, the sidebar usually gets "packed" in the "mobile version".
But if it has "position:fixed" property then when it is called it looks like that:
[Image: https://forum.dokuwiki.org/forum.php?req=thread&download=40036&inline=1&key=9179B0EC]
So it is over some part of the content, which is no good.
=to be continued=
The author has attached one file to this post:
sidebar-2.jpg 105.5 kBytes
You have no permission to open this file.
Avatar
sancaya #3
Member since Aug 2013 · 37 posts · Location: Vnukovo
Group memberships: Members
Show profile · Link to this post
 Especially if we want to scroll the content down. Then we'll need to scroll up to hide the sidebar and then scroll down again.
So I'd like that in the "mobile" state the sidebar (and all its content) would lose its "position:fixed" property.

3. The 3rd problem is that the sidebar could be too big to fit into the screen.
So it would need "overflow:scroll".
But "overflow:scroll" adds ugly scrollbars, and it adds them even if they are not needed.
It's really wrong to have scrollbars on the sidebar when it is on the screen completely.
So I tried "overflow:auto", but it doesn't work.
It doesn't show the scrollbar when I enlarge the site so that scrollbar gets truncated.
[Image: https://forum.dokuwiki.org/forum.php?req=thread&download=40038&inline=1&key=9179B0EC]

I think that all 3 problems would need some template manipulations, my skills are too basic for that.

So could kind Anika or anyone help in solving this interesting task?

(Also there may be some interesting decisions about positioning the sidebar relatively to the page header when it is on the screen).
The author has attached one file to this post:
sidebar-4.jpg 88.8 kBytes
You have no permission to open this file.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-16, 22:39:37 (UTC +02:00)