0 votes
by (360 points)
Is there a way for me to change (lower) the position of the dialog box in Sugarcube?

 

Thanks!

1 Answer

0 votes
by (159k points)

After looking at the dialogs generated by the Save option in the sidebar and the UD.alert() function it appears that the CSS styling used to size the ui-dialog ID'ed element is calculated within the relevant function that is being called to display it, and that that CSS styling is being injected directly into the #ui-dialog element itself which makes it a little harder to overwrite.

You could try adding CSS within your Story Stylesheet area that permanently adds a margin-top to the #ui-dialog element, however that will cause height of the text area of the dialog to be reduced.

You could also try using jQuery's css() function to modify the style attribute of the #ui-dialog element before it is visualised, but I am unsure where exactly in the dialog showing process that can be done.

Hopefully someone with greater CSS or Java-script knowledge will have a better answer for you.

by (360 points)
Haha, well that was a little over my head! I'm not as advanced in CSS as I would like :D

Thank you for your prompt reply!
by (360 points)
Ah, figured it out!  If anyone else has the same question, you can adjust the padding in the #ui-dialog element in story Stylesheet :D (I set mine to 100px)
...