Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

How do I format an image field so that the user inserted image is centered in the field?

pchvpi
Level 1
Level 1

I've tried center anchoring it but it still upper left justifies any image inserted in the image field. 

2 Replies
_Bruce_Robertson
Level 10
Level 10

If your image field has "use original size" as a sizing option then the image will end up in the top left corner.  If you add the following JavaScript in the initialise event of the image field then it will be centered.

this.para.vAlign = "middle";

this.para.hAlign = "center";

 

Regards

Bruce

MHaywood323
Level 2
Level 2

I normally use the old Text Field Trick in LiveCycle.

Create a new Text Field, Set your Text Justification Options and then change the Field to Image Field.

It will retain the Text Field Settings from before.. Used that "trick" many times.