Do you tried to center google ads or text in your wordpress widgets but you couldn't? I've searched a lot how to align google ads in the center of my sidebar widget and I've tried some plugins but it doesn't work till I found out that I need to add a small code in my theme editor.
wordpress theme editor |
Steps:
1- Log in to your wordpress admin page.
2- On the left side click on Appearance. Then sub menu will open.
3- Click on Editor.
4- Now you can see Edit Theme Style sheet. So scroll down till you. find the sidebars section
/* =Sidebars
-------------------------------------------------------------- */
5- Under this section you will find the properties of the main sidebar as following:
display: inline;
float: left;
margin-top: 4px;
padding: 0 15px 30px;
width: 255px;
6- Under these lines you just need to add another line to adjust the text alignment
The line is: text-align: center;
7- Now the lines should look like this:
display: inline;
float: left;
margin-top: 4px;
padding: 0 15px 30px;
width: 255px;
text-align: center;
8- Save and you're DONE
0 comments:
Post a Comment