Image or logo 'center' alignment

Is there a way to 'center' a logo in XLSForms? I read on another support list that it automatically centers on import but I'm unable to get this to work. I've tried a 'span' and 'p' tags.

I was also unable to find anything that would format the position of the images that are attached/inserted as media for different questions via the image column in the XLSFORM Format.

There is no way to do that. Images are always aligned to the top left.

Is there an easy way to add support positioning? It sounds like it'd be a helpful feature.

This would require changing the Xform spec by introducing a new attribute or reworking the existing one (image) to handle both the file name and the positioning.
Maybe first we should consider what makes more sense by default. Should images be aligned to the top left (as it is now) or centered? If centering them makes more sense we can just do that.
@Tyler_Depke @Paul_Shapley are there cases when the current top left alignment is what you prefer or maybe you always want the images to be centered?

1 Like

Can you perhaps provide a mock up of what you might desire, eg a specific example.

If it's ostensibly just for the display of images associated with questions then such is perhaps best accommodated by introducing a (new) optional appearance; that's basically what appearance is for: stating a preference to the XForm client for how to render the question. So I'd be probably be reluctant to introduce new image element attribute for something that seems mostly about how to (preferably) layout the format of the question [although how that may get exposed in XLSForm, eg via an additional field on the image and or big-image column,is a slightly different matter]

1 Like

Since this doesn't seem like something that would affect a lot of users, my assumption would be keeping the default to top left is a good idea. I'd be curious though if languages that read Right to Left still default to the top left, because I imagine that might look a bit odd if the image was top left aligned and the text was all right aligned. In these scenarios, would it be best to align things to top right?

I don't remember the specific case I was looking at when I searched for this. I probably just had an image that was a weird dimension so it looked out of place being aligned top left. I just remember thinking maybe there is a way to change the alignment and in searching on the forum, I found this thread.

Adding that I would find it useful to be able to center the image displayed for a question. For example, when a note is being used to display an organization's logo at the start of a form.

3 Likes