Next in thread → Next in month →

Re: [docbook] Showing important keywords in page margin

From
Viliam Búr <>
Date
2006-01-18T15:24:10+00:00
ID
Thread
Re: [docbook] Showing important keywords in page margin
Jirka Kosek wrote:
> You can implement this solely using CSS. Use float: right for elements 
> that should flow and set margins appropriately.
> You can use almost any DocBook for this, it depends on semantic of stuff 
> you want to place into margins. In your particular case using indexterm 
> of specific type is probably the semantically precise markup to use.

Thank you for the anwser! I did not realize this can be done using mere 
CSS, but it is quite easy.

I used the "sidebar" tag, because this seems semantically most close. 
(The contents of "indexterm" should not be rendered, accorging to the 
"DocBook: The definitive Guide".)

This is the solution, if someone wants to do the same thing:

	-	-	-

<section><title>MySection</title>

	<sidebar><para>keyword 1</para></sidebar>
	<para>Text of the paragraph 1.</para>

	<sidebar><para>keyword 2</para></sidebar>
	<para>Text of the paragraph 2.</para>
</section>

	-	-	-

body {
	margin: 0px;
	background: white url(200px_wide_background.png) repeat-y right;
}
h1, h2, h3, h4, h5, h6, p {
	margin-right: 210px;
	margin-left: 10px;
}
div.sidebar {
	float: right;
	width: 200px;
	font-weight: bold;
}

div.sidebar p {
	margin-left: 10px;
	margin-right: 10px;
}



Viliam
Next in thread → Next in month →