Can I force the background image to be aligned at the top instead of center? | XM Community
Solved

Can I force the background image to be aligned at the top instead of center?

  • 9 August 2019
  • 5 replies
  • 39 views

Userlevel 1
Hello :-)

I am currently updating my survey look and feel and changing the image background. One of the images I have is in "portrait mode" and it displays quite nicely on a mobile:
!


However it displays poorly on desktop, as Qualtrics centers the image by default:
!


Is there a way to force the image to be aligned at the top instead of center?

Thanks for your help!
icon

Best answer by Kate 16 August 2019, 22:08

View original

5 replies

Userlevel 7
Badge +27
Hi @DaisyD

Even if we change the image background to align with top on the desktop. It would be filled with white bars to either side to compensate for the wider space available in desktop. Is this what you are looking for ?
Userlevel 1
Hi @NiC,
Thanks for helping out! I don't want any white bars obviously 😉 but I'm not sure why aligning top instead of center would make bars appear? Is there a code that I can try to see what it would look like, and if indeed there are bars?
Best
Userlevel 7
Badge +27
Hi @DaisyD
If we align image from center of the screen as the image is narrow than the montiors aspect ratio.
Below is preview link of one such case:
https://ugamsandbox.ca1.qualtrics.com/jfe/preview/SV_eeuHvx23JiwrYGh?Q_SurveyVersionID=current&Q_CHL=preview
Userlevel 7
Badge +19
Try putting this in your Custom CSS area:

```#SurveyEngineBody{background: url( YOUR URL HERE) no-repeat center top !important ;}
```

You may need to resize the image to make it fit perfect at a reasonable resolution.
Userlevel 1
@Kate thank you so much!

Leave a Reply