vertically center title on screen
March 10, 2021 12:00 AM
Hi there,
is there any way to center my titel verticvally on screen? Found out how to do thias horizontally, however it always sticks to the top of the screen which is not nice.
Tried to add something like position: absolute; top: 50%; transform: translate(0, -50%); to the css definition of the pageDIv container. (in a post publishing hack operation). And it almoste works.
Only the top:50% value always gets overwritten with top:0px; which destroys my approach.
If I could only get rid of the top:0px; issue.
Any ideas or even solutions out here?
Solutions (3)
The centre vertically is in the same drop down menu as the centre horizontally - its all there. Are you trying to make it relative to the screen or something?
I'd say, Run mode is not a suitable place to test custom code. In the end I don't really know at all what it's good for...
I forgot about Seamless play. When you publish with Seamless play the CSS should also adress the pageDIV class:
Discussion (7)
I have a fixed title size and just would like to center it vertically inside the browser window.
currently it looks like this:
however, would like to have it look like this:
And I can only find the settings in the HTML Page alignment dropdown which lets me center horizontally only. Am I missing some settings?
The centre vertically is in the same drop down menu as the centre horizontally - its all there. Are you trying to make it relative to the screen or something?
Hey timk,
thank you for the hint! :-)
However ... this only makes my title disappear halfway in run-mode and the changes don't appear at all after publishing to html. :-(
Any further idea or approach?
Ahh yes, your screenshots help describe your issue much better, I am happy to be following this too as we have something similar. Doesn't overly bother me in terms of where it is displayed but I can apply it as a nice to have down the road.
I'd say, Run mode is not a suitable place to test custom code. In the end I don't really know at all what it's good for...
I forgot about Seamless play. When you publish with Seamless play the CSS should also adress the pageDIV class:
Hey timk,
this works like charm (after I removed one extra exclamation mark which I added by mistake before ;-)
thank you so much!
Cheers,
Kai