iModernize - The Profound Logic Software Blog

Profound Pro Tips: Vertically Center HTML Container in a Grid

Posted by Tim Losee on Jul 12, 2018 2:37:22 PM

Profound Pro Tips is a blog series focused on issues that our support team receives and questions our Profound Logic customers have. Don't see your question/concern in Profound Pro Tips? Please feel free to contact our team or leave us a comment below. 

Today’s Topic: Vertically Centering HTML Code in Grids

Keep reading to learn more....

A question we have been receiving from our customers is how they can vertically center their HTML code, specifically when using an HTML Container to wrap the text. Most of the time if the HTML Container only has one line it will automatically center the text, but what happens when your text spans more then one line? Follow the below steps to see how to vertically center your text:

*Please note: There are many different ways to vertically center text and there is no "best" solution as different methods work better in different situations. If the below steps do not help your issue, please reach out to our Support Team to help find the solution that best fits you.*

Step #1: First, you will need to remove the 'top' and 'left' properties from the MYSTS HTML Container.
(Right click -> Remove Property Value)

Remove unneeded properties

Step #2: Add a unique CSS class to the HTML Container using the 'CSS Class' property.

HTML container properties with highlight

 Step #3: Create a CSS file that applies the following CSS traits to the class just defined. 

CSS file

Step #4: Include the CSS file to the project. This can be done in 1 of 2 ways: one way is by including it in /userdata/custom/, the second way is you can include it by using the 'external css' property of the record format. You can read more about both options below:

http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=5275824
http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=5275821

(Note: these pages talk about external JavaScript, but external CSS works in the exact same manner.)

For the purposes of this walk-thru we choose to do the 'external CSS' property so that the CSS page is not accidentally  included in future projects. 

As you can see in the below preview, the text is now vertically aligned in the column.

What the canvas looks like when it is put together

If you have any questions about this or other issues you might be having, please contact our Support Team and they will be happy to help assist you. 

Learn how to Deliver Modern IBM i Business Applications with Profound UI Version 6! Watch the replay of this webinar hosted by Scott Klement Today!


 

Topics: RPG Development, Application modernization, IBM i applications, Node.js, Profound.js, IBM i, RPG, AS400 modernization, IBM i Modernization, Agile modernization, iSeries, Legacy Modernization, Profound UI, AS 400, AS_400, Profound Logic

Subscribe to Blog Updates

...and get The 2017 State of IBM i Modernization White Paper FREE!

cover page.png

Recent Posts