centering button within panel?

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

centering button within panel?

#1

Postby t4nu » Thu Feb 18, 2016 3:36 am

Hi,
I tried to place the button on the center of the panel, I put this on the control style:

width: 125px;
text-align: center;
margin-left: auto;
margin-right: auto;

but the button still placed on the left.
What should I do to make it centered?
Thanks in advance for the help.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Feb 18, 2016 9:17 am

You use the layout properties of the containing panel. Set the layout to horizontal or vertical, whichever you want, then set the horizontal alignment properties in layout properties.
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#3

Postby Wai » Thu Feb 18, 2016 9:21 am

Have you tried using Ebase Layout instead of CSS?

In a Panel, there is a Layout property. You can set this to horizontal box with Block horizontal alignment to center

This will center a button in a Panel.

If you do want to go down the CSS route, you should make sure there are no layout types on your Panel.
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#4

Postby t4nu » Thu Feb 18, 2016 9:28 am

Thank you very much.
The problem solved :D
0 x


Who is online

Users browsing this forum: No registered users and 6 guests