How do I remove borders from a table?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
oceanclub
Sr. Propeller Head
Posts: 277
Joined: Thu Oct 10, 2013 4:45 am
Location: Dublin

How do I remove borders from a table?

Post by oceanclub »

I can remove borders from a table? I can do this in CSS and the results are as expected for a simple HTML page.

However, if I try to do the same in Flare, the borders show up.

For example this still shows borders:

<table border-collapse="collapse" width="100%" border-style="hidden!important">

Any help appreciated,

P.
Gene K
Propeller Head
Posts: 28
Joined: Mon Apr 13, 2020 1:56 pm

Re: How do I remove borders from a table?

Post by Gene K »

In-line CSS styling uses a different syntax from HTML attributes. You need to set the style= attribute, and any CSS properties within the required quotation marks.

In your case: <table style="border-collapse: collapse; width: 100%; border-style: hidden;">

See this page for a detailed explanation:

https://www.w3schools.com/tags/att_style.asp

That said, is there some reason you need to use in-line styling for this? Even if you're dead-set on avoiding a separate stylesheet, it would probably be better to use a <style> tag in your <head> section, as described here:

https://www.w3schools.com/tags/tag_style.asp

Last thing - I'm guessing you threw in the !important as part of your efforts to get the styling working, but you'll probably want to remove that from your finished product. It's considered bad practice to use !important unless absolutely necessary because it can complicate your styling down the road.

EDIT:

It just occurred to me... If you're looking at the XML editor, it keeps a light dotted border to help you work with tables even if the border is hidden in the output. I've attached an example of a table with inside borders but no outside borders. The table looks like it has a border, but the outer border is correctly removed from all my outputs.
You do not have the required permissions to view the files attached to this post.
Post Reply