Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Fixing an image to a page.

3 years ago

Hey there,

I am here again with a question about images. I do know how to set an image as a background using global page script. Now for my storygame I have the background set so it looks like some old paper. For the first page I want there to be a title image of the city. I have inserted that by simply using the image function in the toolbar above where you can also change the color and size of written words.

The problem with that is I can't manage to fix the position of the image to the page. It is always at the top left corner if I change the size of my viewer window.

Is there any way I can make it a fixed size and position on the page it is on?

Fixing an image to a page.

3 years ago
EDIT- Oh, wait, I just saw that you mean if you change the size of the window viewer. Welp, can't help you there, other than potentially one solution: measure the length of a full sized window in units of pixels, then add transparency to your image increasing the length of the image so that it matches the window size, but keep the actual picture in the center of the now larger image. For example, with the default view size you can put the image in the middle by making the width 670 pixels, with transparency on either side.

Obviously this will do little for arbitrarily sized viewer choices.

Hopefully the rest of this is useful.

You should be able to use on-page scripting for that. For example (using brackets instead of less-than/greater-than symbols):

[img src="INSERT IMAGE URL" width = "xxx" height = "yyy"]

If you want to move the picture to the center, you could use text align before posting the image script:

[p style="text-align:center][img src="INSERT IMAGE URL" width = "xxx" height = "yyy"][/style]

Fixing an image to a page.

3 years ago
Does using width="100%" help?

Fixing an image to a page.

3 years ago

Using simply that worked. Thank you Berka.

Fixing an image to a page.

3 years ago

On page means I simply have to put that directly onto the page ?

[p style="text-align:center][img src="http://chooseyourstory.com/i/?55003" width = "100%"][/style]

Does not seem to be working though...

Fixing an image to a page.

3 years ago
Yeah, but what you got there is in box script. On Page is the stuff in %%

Oh, never mind, I see what you're asking now.

Use single quotes inside %%