Text position - Forum

Forum Navigation
You need to log in to create posts and topics.

Text position

How can we set the text inside a container such that it has a middle vertically position?

Go to Project > Properties > Styles and add this code:

.center{
  top:0px!important;
  left:0px!important;
  right:0px!important;
  bottom:0px!important;
  margin:auto!important;
}

Add a Container, or Paragraph or Headline object inside a Container.
Click on the new added object and go to Properties > Advanced > css-class
Choose "center".
I will add a new command to do this programmatically on next release.

 

farhad2008 has reacted to this post.
farhad2008

It's pretty good!

Thank you so much

@asmat there is already a command to position any object relative to its Container:

SetRelativePosition "MyObject" "middle" "center"

 

I knew it before and also I used this command so much with other object but with "text" using of this command is a little bit hard.

It shakes when the application run and also during changing of the page.