Is there a way to center text in Quixe?

I’ve tried everything I can think to try. Glulx Text Effects works for other interpreters, but not for Quixe. Inform’s “center” breaks down after the first printed line. If centering can be achieved with CSS, I’m not sure what I have to type into Inform to get the style from glkote.css to apply to the text. I’ve messed around with Style_user1 and Style_user2 but couldn’t figure it out.

I only want a few lines centered. Not the whole game. Just a little blurb right at the start.

It is up to the Glk implementation (different interpreters may use different Glk implementations; some may be compatible with multiple) whether or not it supports certain styles; this is controlled by stylehint_Justification. (I don’t know how to call any Glk functions (or to do anything else) in Inform, but I know how Glk is working.) It is up to the interpreter and/or the user whether or not any style hints will be accepted. Except in a grid window, you can’t force the text to be centered if the user does not want it (or the interpreter does not implement it), as far as I can tell.

Thanks for the reply! I actually just got something to stick.

In the glkote.css file:

.Style_user1 { color: #000; display: block; padding: 0 65px 0 0; text-decoration: none; width:100%; text-align:center; }
And then in Inform:

When play begins: say "[special-style-1]Testing [line break]Testing[roman type]"
This produces centered text in Quixe, across multiple lines, and they stay grouped together in one place like normal. Using text-align:center by itself doesn’t work, nor do any of the other methods I listed before, but for some reason, this configuration does.

That might also help for other implementations that use CSS (although, I don’t quite know). I think it is needed because specifying alignment doesn’t make sense for inline elements, but only for block elements, so “display: block” is needed. (I do not actually know much about it; those are just my guess. I do not know what HTML elements are used by Quixe (or if it even uses HTML), so I do not know what thing is actually needed and how; but you say that works, therefore, if that works!)

One thing is that you should never set the foregroud colour unless the background colour is also set, and vice-versa. So since you are setting the foreground of user1 style to black, you should set the global background to write or light gray probably.

Ah, I thought I was setting the text color to black! It looks okay in Firefox, Chrome, and Safari. Black text on a white background. But now I see that I can delete it and nothing changes, so… I’ll delete it just to be safe!