DocBook: css has no effect
Oxygen general issues.
-
- Posts: 13
- Joined: Thu Oct 01, 2009 9:53 pm
DocBook: css has no effect
Hi,
I have written a user guide in DocBook and output it as PDF and HTML using the Oxygen transformation scenarios. I've tweaked the PDF xsl files a bit and they have the desired effect.
Now I'm trying to improve the appearance of the HTML output. I prepared a simple css and specify the filename in the parameter html.stylesheet in the HTML transformation scenario. For example, I just try to change the color of the font. I've tried putting various stuff in the css, but it is not applied. Here's the latest version:
div.chapter div.titlepage h2 {
font-size: 180%;
font-family: Helvetica;
font-weight: Bold;
color: green
}
Can you please give me a simple code to put in the stylesheet to make the titles green--it is Saint Patrick's day, after all
Thanks,
Patricia
I have written a user guide in DocBook and output it as PDF and HTML using the Oxygen transformation scenarios. I've tweaked the PDF xsl files a bit and they have the desired effect.
Now I'm trying to improve the appearance of the HTML output. I prepared a simple css and specify the filename in the parameter html.stylesheet in the HTML transformation scenario. For example, I just try to change the color of the font. I've tried putting various stuff in the css, but it is not applied. Here's the latest version:
div.chapter div.titlepage h2 {
font-size: 180%;
font-family: Helvetica;
font-weight: Bold;
color: green
}
Can you please give me a simple code to put in the stylesheet to make the titles green--it is Saint Patrick's day, after all
Thanks,
Patricia
-
- Posts: 9508
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DocBook: css has no effect
Hi Patricia,
If you are transforming a Docbook book (with chapters) and you want to make green only the chapter titles your CSS seems fine.
Another way to make all titles green would be something like:
The problem is that probably the created HTML document references to the CSS file with the wrong location (the browser does not report any error in case the CSS is not found).
What you can do is open the output HTML in Oxygen and look for the link to the CSS like:
<link rel="stylesheet" href="test.css" type="text/css">
The link path should be relative to the HTML file.
Unfortunately the fix will not be available in time for Saint Patrick's day.
Regards,
Radu
If you are transforming a Docbook book (with chapters) and you want to make green only the chapter titles your CSS seems fine.
Another way to make all titles green would be something like:
Code: Select all
h2.title{
font-size: 180%;
font-family: Helvetica;
font-weight: Bold;
color: green
}
What you can do is open the output HTML in Oxygen and look for the link to the CSS like:
<link rel="stylesheet" href="test.css" type="text/css">
The link path should be relative to the HTML file.
Unfortunately the fix will not be available in time for Saint Patrick's day.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service