CSS-based PDF: Make borders go all the way across page
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
CSS-based PDF: Make borders go all the way across page
Here is what my @page looks like:
@page {
size: us-letter landscape;
column-count: 2;
column-gap: 0.5in;
margin-left: 0.1in;
margin-right: 0.1in;
margin-top: 0.1in;
margin-bottom: 0.5in;
}
I'd like to have a border go all the way across the bottom of the page and override the margins. When I add something like this to my @page:
border-left: 0.5in solid yellow
that border is still constrained by the left and right margins. Is there a way to make it extend all the way, regardless of the margins?
@page {
size: us-letter landscape;
column-count: 2;
column-gap: 0.5in;
margin-left: 0.1in;
margin-right: 0.1in;
margin-top: 0.1in;
margin-bottom: 0.5in;
}
I'd like to have a border go all the way across the bottom of the page and override the margins. When I add something like this to my @page:
border-left: 0.5in solid yellow
that border is still constrained by the left and right margins. Is there a way to make it extend all the way, regardless of the margins?
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: CSS-based PDF: Make borders go all the way across page
Hi,
You should just add an additional "@bottom-left-corner" page-margin-box selector inside your "@page" rule.
For the "@bottom-left-corner" you should set the same margin and border on its left side.
More specific:
In the same way as you did for the content pages ("@page" selector), you could also add it to your cover page:
Regards,
Costin
You should just add an additional "@bottom-left-corner" page-margin-box selector inside your "@page" rule.
For the "@bottom-left-corner" you should set the same margin and border on its left side.
More specific:
Code: Select all
@page {
size: us-letter landscape;
column-count: 2;
column-gap: 0.5in;
margin-left: 0.1in;
margin-right: 0.1in;
margin-top: 0.1in;
margin-bottom: 0.5in;
border-left: 0.5in solid yellow;
@bottom-left-corner{
content:"";
margin-left: 0.1in;
border-left: 0.5in solid yellow;
}
}
Code: Select all
@page front-page {
@bottom-left-corner{
content:"";
margin-left: 0.1in;
border-left: 0.5in solid yellow;
}
}
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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