Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What's the best way in Confluence to control the vertical alignment of text next to a graphic?

Andy McAleer October 18, 2018

How can I control the text ("Learn more...") that appears to the right of this image? I'd like it to be vertically centred on the image so it's aligned to the middle of the image:

 

text-alignment.PNG 

In Word, I'd use a table with the image in one cell and vertically centred text in another (and no borders on the table) to accomplish this.

However, although I can add a table and whitespace to cells, I can't remove table borders. 

Does anyone know how best to accomplish this in Confluence? Is the HTML Table macro the way to go?

2 answers

1 accepted

0 votes
Answer accepted
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2018

This is a classic HTML layout issue, that requires setting the row height. But, in this case, where the image is taller than the text you are in luck.

By HTML table macro, I assume you mean a formatted table pasted into the HTML macro? Yes you could create a custom table, formatted using inline CSS, that would allow you to align both the image and the text to the middle of a one row table. You can also set the table borders to zero so they don't appear. This is probably the quickest and easiest way to go.

Andy McAleer October 18, 2018

Thanks, Bill. Very good to get confirmation on that. :-)

Jens Iwanenko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2018

You could also use the HTML macro to insert customized CSS and keep the actual content in the WYSIWYG editor. Personally, I find it more comfortable to work on the content as I see it.

I used to require this "feature" on a couple of pages a while back so I wrote a little user macro:

## Macro title: Hide Table Border
## This macro hides the grey borders of tables.
## @noparams
<p>
<style type="text/css">
<!--
.confluenceTd {border: 0;}
-->
</style>
</p>

This specific macro only hides borders of standard cells, not table headers. For a layout table that is not a problem, though. If you don't need it extensively, you can just paste the style part in your HTML macro and it does the trick.

Like Kelly Bauer likes this
Shawn
Contributor
February 21, 2019

would be nice to see a complete solution for people like me who are very new to confluence and trying to learn..

Like # people like this
Brian Harvey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2019

It would be even better to see a solution that does not require someone within an enterprise organization to be the confluence administrator.  

Being the admin of the space is not a problem, but so many require the confluence admins to allow custom user macros to be enabled or other things that most of us just do not have access to.

Like # people like this
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2019

If you want to change the behavior of Confluence, you have to have admin privileges. This is by design to ensure that someone with good working knowledge is making these changes as they could impact an entire Confluence instance.

There are also corporate reasons for this level of control. For example, if you need to insure that a Confluence site adheres to some corporate style, having 100 authors each deciding to create a different look and feel makes that hard.

You can help the process along by creating your own personal instance of Confluence, coming up with a working solution that you can then relay to a Confluence admin, being able to say you have done initial testing.

Deleted user April 24, 2020

It would be nice to have the option directly in confluence editor - the same as we have buttons for horizontal alignments - to have the same for vertical alignments.

Like # people like this
Jasho Mitra July 9, 2020

Spot on Ales_Dvorak. Even I am struggling to vertically align the text within a cell in a Table. Wish Confluence gets that feature soon. Make life so much easy...

Like # people like this
Scott DeLugan
Contributor
October 6, 2021

Agreed. The option to vertically align text within a table cell would be very helpful!

Like # people like this
0 votes
Zeyu Wang January 30, 2024

here is a free plugin for table  vertical align ,works on  confluecne server 7.0-7.15

https://marketplace.atlassian.com/apps/1222494/vertical-align-for-confluence/version-history

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events