Hello!
1/ I am trying to center a paragraph in my CSS (p.important) and cannot get it to work.
I do not want the text inside the paragraph centered, I just want the paragraph centered in the pages of my output (HTML Help). p.important is a style that has a width of 60% (I have set the left and right margins to 20% each so that total is 100%). There is some padding inside the parapgraph but I believe this has no impact whatsoever on the centering of the paragraph as the padding is applied within the paragraph. When I build my ouput, the paragraph is not centered on the pages.
I tried playing with text-align and vertical-align to no avail...
2/ I am also trying to set a table style that centers my tables. For this, I associated my tables with my table style and when I right-hand click on a table and select Table Properties, I made sure that Align was set to center on the Table Properties dialog. I have set the autofit to Window to 70% and my table appears centered in Flare but not in the output, nor on the preview. I can get the table to be centered if I fiddle with the HTML code and set table align to center in the declaration of the table but this is in-line formatting, which I do not want to use. I tried to add an align: center attribute in the table CSS but was unlucky in getting it to work.
Am I doing something wrong? Any ideas on how to get these two things to work?
Thanks in advance for any help.
Centering issues (paragraph & table)
-
MC Hammer
- Sr. Propeller Head
- Posts: 225
- Joined: Wed Aug 08, 2007 3:04 am
- Location: In a galaxy far, far away
Centering issues (paragraph & table)
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
-
KevinDAmery
- Propellus Maximus
- Posts: 1985
- Joined: Tue Jan 23, 2007 8:18 am
- Location: Darn, I knew I was around here somewhere...
Re: Centering issues (paragraph & table)
Can you describe the exact symptoms? I can't tell if "not centered" means it's slightly off or still left aligned or something else. Also, is the paragraph just text or does it have a border around it? If it is just text, then the padding will have an affect on the overall placement of the words. Think of the paragraph as a box: the margin tells the browser how much space to put between the outside of the box and any other elements (other paragraphs, the sides of the page, etc.) and the padding tells the browser how much space to put between the words in the paragraph and the inside of the box. The padding and the margin add together to determine your total distance from the left side of the page and the left edge of the text.MC Hammer wrote:Hello!
1/ I am trying to center a paragraph in my CSS (p.important) and cannot get it to work.
I do not want the text inside the paragraph centered, I just want the paragraph centered in the pages of my output (HTML Help). p.important is a style that has a width of 60% (I have set the left and right margins to 20% each so that total is 100%). There is some padding inside the parapgraph but I believe this has no impact whatsoever on the centering of the paragraph as the padding is applied within the paragraph. When I build my ouput, the paragraph is not centered on the pages.
I tried playing with text-align and vertical-align to no avail...
Again, could use a description of what "not centered" means: a little off or still left aligned?2/ I am also trying to set a table style that centers my tables. For this, I associated my tables with my table style and when I right-hand click on a table and select Table Properties, I made sure that Align was set to center on the Table Properties dialog. I have set the autofit to Window to 70% and my table appears centered in Flare but not in the output, nor on the preview. I can get the table to be centered if I fiddle with the HTML code and set table align to center in the declaration of the table but this is in-line formatting, which I do not want to use. I tried to add an align: center attribute in the table CSS but was unlucky in getting it to work.
Am I doing something wrong? Any ideas on how to get these two things to work?
Thanks in advance for any help.
Another approach
One option you could use which would work in online output (but probably not in Word or Framemaker output) would be to put the paragraphs and tables in a Div. You could then apply a center attribute to the Div.
Until next time....

Kevin Amery
Certified MAD for Flare
Kevin Amery
Certified MAD for Flare
-
MC Hammer
- Sr. Propeller Head
- Posts: 225
- Joined: Wed Aug 08, 2007 3:04 am
- Location: In a galaxy far, far away
Re: Centering issues (paragraph & table)
Hi Kevin
Thanks for your input.
Paragraphs are slightly off (a bit more towards the left), they have no borders but according to what you are saying, the mis-alignment may be due to the padding. I need to have a look at this.
Tables are still left-aligned. Is there somewhere in the table stylesheet that I could set table align to center?
The DIVs seem like a good idea. I will do a bit more investigating.
Thanks for your input.
Paragraphs are slightly off (a bit more towards the left), they have no borders but according to what you are saying, the mis-alignment may be due to the padding. I need to have a look at this.
Tables are still left-aligned. Is there somewhere in the table stylesheet that I could set table align to center?
The DIVs seem like a good idea. I will do a bit more investigating.
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Re: Centering issues (paragraph & table)
Part of this is browser incompatibility. When you tell Flare to center a table, it adds margin:auto to the style property of that table (inserts it inline, btw). Firefox handles that code fine. IE does not. Or maybe it's the other way around, but I'm pretty sure FF is the one that handles it. The only way to get IE to center the table (IE6, at least), is to add the align:center property inline to the table tag. (IE7 may handle the margin:auto option better, but I don't have it so I don't know.)MC Hammer wrote:Tables are still left-aligned. Is there somewhere in the table stylesheet that I could set table align to center?
I haven't been able to figure out a way to add a style to the stylesheet so that the table centers properly in IE and FF, other than to create a DIV set to center text and then insert the table inside that DIV. Frankly, it's just as easy to manually add the align:center property to the table tag, so I do that. And just to be clear, I have both margin:auto and align:center inline on tables in topics -- IE ignores margin:auto but follows align:center and FF follows margin:auto but ignores align:center.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
KevinDAmery
- Propellus Maximus
- Posts: 1985
- Joined: Tue Jan 23, 2007 8:18 am
- Location: Darn, I knew I was around here somewhere...
Re: Centering issues (paragraph & table)
Another factor is line length. If your paragraphs are ragged right rather than full justified, your lines will rarely use the full width, meaning that it may look like there's more space on the right than the left. The centering works on the center of the "box" that I talked about earlier, which is based on the defined line length rather than what is actually used by the words on each line.MC Hammer wrote:Hi Kevin
Thanks for your input.
Paragraphs are slightly off (a bit more towards the left), they have no borders but according to what you are saying, the mis-alignment may be due to the padding. I need to have a look at this.
I can't think of a 100% effective way to solve that, unfortunately, since line lengths will vary depending on your content. I suppose you could try to full justify everything, but that's hard to read and looks odd in online work, plus you then have to worry about hyphenation and variable spacing.
Until next time....

Kevin Amery
Certified MAD for Flare
Kevin Amery
Certified MAD for Flare
-
MC Hammer
- Sr. Propeller Head
- Posts: 225
- Joined: Wed Aug 08, 2007 3:04 am
- Location: In a galaxy far, far away
Re: Centering issues (paragraph & table)
Hi Lisa and Kevin
Thanks very much for your valuable input (as usual!).
Lisa, it is interesting to know that IE and FF look at different attributes for tables...
As for paragraphs, I will investigate a bit more and see if I can reach a "close-to-centered" position. I have some padding so it could also be playing a part (as well as the line length mentioned by Kevin).
Thanks for your advice and for giving me some ideas to explore.
Thanks very much for your valuable input (as usual!).
Lisa, it is interesting to know that IE and FF look at different attributes for tables...
As for paragraphs, I will investigate a bit more and see if I can reach a "close-to-centered" position. I have some padding so it could also be playing a part (as well as the line length mentioned by Kevin).
Thanks for your advice and for giving me some ideas to explore.
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output