Center body in Chrome
-
Hello and thanks for a great work with this theme!
I am trying to center the whole website (the body) I am working on. I have done a child theme to Customizr. Everywhere I look it seams the correct way to do it is to add the following to style.css:
‘
body {
text-align: center;
}
#wrapper {
width: 1170px;
margin: 0 auto;
text-align: left;
}
‘where wrapper is added around all content. I made this wrapper by adding the following to functions.php:
‘
/* Adding wrapper immediately inside body */
add_action(‘__before_header’, ‘open_wrapper’);
function open_wrapper() {
?>
<div id=”wrapper”>
<?php
}
add_action(‘__after_footer’, ‘close_wrapper’);
function close_wrapper() {
?>
</div>
<?php
}
‘It centers fine in Firefox but in Chrome it is placed to the left. I observe that while loading in Chrome it first goes to the centre but then jumps to the left when finishing loading
The website:
- The topic ‘Center body in Chrome’ is closed to new replies.