← Prev in month ← Prev in thread

TOC sidebar, not "floating"

From
Tristan Fiedler <>
Date
2005-03-29T19:12:40+00:00
ID
Thread
TOC sidebar, not "floating"
(I apologize for the CSS question, but we are dealing with a complex 
nesting of "div" elements in the HTML output for DocBook)

Thank you for the spot-on suggestions for the Table of Contents in a 
sidebar which remains (CSS) fixed.  I have :

div.toc {
	font-size: 0.7em;
	color: black;
	position: fixed;
	top: 200px;
	left: 2px;
	width: 242px;
	border: 2px grey solid;
	padding: 4px;
	height:50%;
	float: left;
	overflow: scroll;
}
div.article { margin-left: 265px;}

Using pixels the small text will stay constant regardless of the size 
of the browser window.

-- Since many of the docbook users are very familiar with weblayout, 
perhaps someone could answer this :

I would like the rest of the DocBook "article" (my root element) to 
"float" around this TOC sidebar.  Since the TOC sidebar only takes 50% 
of the vertical height of the screen, and I have set float: left, I 
thought the other sections of the article would "fill in" below the TOC 
as the reader scrolls.

However, even if I remove the :
div.article { margin-left: 265px;}

The main text never comes underneath (ie does not appear to wrap 
around) the TOC.

Cheers,        Tristan
---
Tristan J. Fiedler
Postdoctoral Fellow - Stein Lab
Cold Spring Harbor Laboratory
← Prev in month ← Prev in thread