Moving the table to the center of the page
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 21
- Joined: Mon Dec 05, 2022 9:35 am
Moving the table to the center of the page
Post by [Stupid]_[User] »
Hello everyone!
There are a lot of tables in my document. Most them have different sizes. It's a big problem for me that small tables "sticky" to the left part of the page (for example you can see Table 3. Fixed in the picture below). Is there any way to move such tables to the center of the page?
There are a lot of tables in my document. Most them have different sizes. It's a big problem for me that small tables "sticky" to the left part of the page (for example you can see Table 3. Fixed in the picture below). Is there any way to move such tables to the center of the page?
oxyforum.PNG
It wold be awesome for me to get a result, similar to figure below (I do it by using Microsoft Office).
oxyforum_word.PNG
You do not have the required permissions to view the files attached to this post.
-
- Posts: 39
- Joined: Mon Jul 25, 2022 11:18 am
Re: Moving the table to the center of the page
Post by andrei_pomacu »
Hello,
If you are using PDF&CSS Transformation you could easily add new CSS rule which will align your table in the middle of the page.
Andrei
If you are using PDF&CSS Transformation you could easily add new CSS rule which will align your table in the middle of the page.
- Add on your table an outputclass to be easily identified in the CSS file .
Code: Select all
outputclass="fixed-table-center"
- Create a CSS file with this code inside:
Code: Select all
*[class ~="topic/table"][outputclass = "fixed-table-center"]{ margin-left: auto; margin-right: auto; }
- For linking the CSS file, you have two options:
- Create a publishing template, create the customization CSS file inside the template folder, and link it to the publishing template descriptor. For assistance, see Publishing Templates.
- Choose an existing publishing template, then edit the scenario and set the full path to the custom CSS file as the value of the args.css parameter. The rules from custom CSS will override the rules from the template CSS files.
Andrei
-
- Posts: 21
- Joined: Mon Dec 05, 2022 9:35 am
Re: Moving the table to the center of the page
Post by [Stupid]_[User] »
Hi, Andrei!andrei_pomacu wrote: ↑Mon Dec 05, 2022 1:48 pm Hello,
If you are using PDF&CSS Transformation you could easily add new CSS rule which will align your table in the middle of the page.Regards,
- Add on your table an outputclass to be easily identified in the CSS file .
Code: Select all
outputclass="fixed-table-center"
- Create a CSS file with this code inside:
Code: Select all
*[class ~="topic/table"][outputclass = "fixed-table-center"]{ margin-left: auto; margin-right: auto; }
- For linking the CSS file, you have two options:
- Create a publishing template, create the customization CSS file inside the template folder, and link it to the publishing template descriptor. For assistance, see Publishing Templates.
- Choose an existing publishing template, then edit the scenario and set the full path to the custom CSS file as the value of the args.css parameter. The rules from custom CSS will override the rules from the template CSS files.
Andrei
It works great! Thanks a lot!
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