A Couple Centering Issues
-
I am very close to having my blog formatted to my liking, but have two small issues that I’m sure someone better than me at CSS could spot quick enough:
1. There’s something a little wonky with my page width. It shows when you shrink the browser width horizontally; note how the footer hits a point where it jitters over to the right. I can’t figure out how to lock that in place.
2. When viewing the blog from an iPhone (in “view full site,” not the mobile theme), everything looks great except it sticks a little to the left. I’m not sure how to center it.
Any ideas would be appreciated.
Thanks!
Randy
The blog I need help with is: (visible only to logged in users)
-
Hi Randy,
There’s some issues with your custom CSS that’s causing the layout issues that you noted.
I looked through this with a developer on our theme team and he came up with the following advice for you:
- It would be better to style the page wrapper div (has the id #page and class .site), and center it rather than styling the HTML element. Sometimes styling the HTML element has adverse effects.
- When overriding a theme’s CSS, override the exact properties you need to override.
To resolve the issues you noted:
- Remove the width, margin and overflow-y CSS on the html element.
- Remove width: 534px !important on #main. Add .site-main { max-width: 534px !important; }.
- On #primary, add { float: none !important; }.
- On .site-footer .sidebar-inner add { max-width: 534px !important; }.
- For good measure, you could add #page { width: 534px; margin: 0 auto; }.
Let me know how you get on with those steps. We can take a further look if you note any issues.
-
Thanks for the detailed response, siobhyb!
I’ve managed to fix my problems and tighten things up a bit better using those pointers.
I’m sure there are still a few quirks, but I’m very pleased for now :)
-
Hi Randy,
I’m so happy to hear that. :) We’re right here if you have any extra questions too.
- The topic ‘A Couple Centering Issues’ is closed to new replies.