tips:toc_use_position_fixed
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:toc_use_position_fixed [2011-05-14 11:49] – Restructuring lupo49 | tips:toc_use_position_fixed [2014-05-10 18:17] (current) – [What we want (if we want it :)] 91.42.157.30 | ||
---|---|---|---|
Line 21: | Line 21: | ||
We want to do the horrible tricks of the fixed div...Why horrible? Because it is not recommended. | We want to do the horrible tricks of the fixed div...Why horrible? Because it is not recommended. | ||
- | Look to this horrible implementation: | + | Look to this horrible implementation: |
The implementation of the TOC in DokuWiki actually is good, it is just for special use that you can use this trick. | The implementation of the TOC in DokuWiki actually is good, it is just for special use that you can use this trick. | ||
Line 27: | Line 27: | ||
===== What we have to do ===== | ===== What we have to do ===== | ||
- | Just replace | + | Just add the declaration of " |
- | (For instance: lib/tpl/ | + | |
<code css> | <code css> | ||
- | /* ---------- table of contents ------------------- */ | ||
- | /* | ||
div.dokuwiki div.toc { | div.dokuwiki div.toc { | ||
- | margin: 1.2em 0 0 2em; | + | |
- | float: right; | + | margin: 1.2em 0 0 2em; |
- | width: 200px; | + | position: absolute; |
- | font-size: 80%; | + | right: |
- | clear: both; | + | top: 100px; |
- | } | + | z-index: 10; |
- | */ | + | width: |
- | + | height: | |
- | div.dokuwiki div.toc { | + | overflow: |
- | /* Netscape 4, IE 4.x-5.0/Win and other lesser browsers will use this */ | + | |
- | margin: 1.2em 0 0 2em; | + | |
- | position: absolute; | + | |
- | right: | + | |
- | top: 100px; | + | |
- | z-index: 10; | + | |
- | width: | + | |
- | height: | + | |
- | overflow: | + | |
} | } | ||
body > div.dokuwiki div.toc { | body > div.dokuwiki div.toc { | ||
- | | + | |
- | position: fixed; | + | position: fixed; |
} | } | ||
+ | |||
<!--[if gte IE 5.5]> | <!--[if gte IE 5.5]> | ||
<![if lt IE 7]> | <![if lt IE 7]> | ||
- | |||
div.dokuwiki div.toc { | div.dokuwiki div.toc { | ||
- | | + | |
- | | + | position: absolute; |
- | right: expression( ( 20 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + ' | + | right: expression( ( 20 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + ' |
- | top: expression( ( 100 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + ' | + | top: expression( ( 100 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + ' |
- | z-index: 10; | + | z-index: 10; |
- | overflow-Y: | + | overflow-Y: |
} | } | ||
< | < | ||
Line 75: | Line 62: | ||
</ | </ | ||
- | I use in the [[http:// | + | I use in the [[http:// |
<code css> | <code css> |
tips/toc_use_position_fixed.1305366544.txt.gz · Last modified: 2011-05-14 11:49 by lupo49