Centering Background Image

J

Johnny Corona

Does anybody know if there is a way to center a background image in InfoPath?
I have a nice looking form with a background that enhances it nicely but the
background is overwhelming when the user maximizes the InfoPath window - too
much background on either side of the form.

I would like the form to look fixed in width, with white borders on the
sides if the user expands the window.

The only options for background image position are "upper-right" and
"upper-left." I also tried adjusting the Custom Layout Width, but this only
affects the default size of the tables.

Any ideas?

Thanks in advance!

~Johnny
 
B

Brian Teutsch [MSFT]

If you use File->Extract Form Files while you're designing the form, you can
view the XSL (and XHTML+CSS) used to create the form. Set the value to be
top-left beforehand, so you have the style to play around with.

Open the XSL for your view in Notepad, then just change the
background-position style to be "center center". You can re-open the XSF
file in that folder in the designer, then perform save-as to repackage all
those files into an XSN. Your centered style should remain just fine.

This isn't included by default, because InfoPath forms with layout tables
and repeating containers don't grow as the window expands, so most of the
time an iamge that moves around would be in an unpredictable location.

Brian
 
J

Johnny Corona

Nice, Brian! Worked like a charm.

The appropriate tag for me was "top center" - I have it repeating vertically.

FYI, it's a nice feature for making slick looking forms. Might consider
this is a feature in the next rev.

Thanks!

~Johnny
 
J

Johnny Corona

Nice, Brian! Worked like a charm.

The appropriate tag for me was "top center" - I have it repeating vertically.

FYI, it's a nice feature for making slick looking forms. Might consider
this is a feature in the next rev.

Thanks!

~Johnny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top