Make Phone sitetitle centered vertically on front page
-
Hello. I've tried for ages to make my sitetitle image centered both horizontal and vertically on just the frontpage and only on the Phone version. Normally, the sitetitle is top left centered.
So far, I've target the css as following and put it in the Custom CSS for Mobile
body.slug-index .mobile-title img { }
I can resize the title to fill out the screen, so it's horizontal centered, but no matter what I can't make it vertically centered. It will only be positioned on top of the screen, so somehow it might be keeping it's "top left" values.
Any suggestions, thanks!
-
I've also tried
body.slug-index .sitetitle { left: 50%!important; top: 50%!important; }
As changing these values directly in the browser inspect panel will correctly place the sitetitle img in the center of the browser. However, using these values in the custom css has no effect.
-
ure using the wrong selector
body.slug-index .mobile-title { left: 50%!important; top: 50%!important; transform: translate(-50%, -50%); }
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it