Do you like the margin on your homepage or on other pages better?
Thank you for the superfast answer. I prefer the margins on my other pages.
I would create a child theme and place this code in the style.css file. You can also make the changes by going to the admin panel->appearance->edit, and pasting the code at the bottom of the style.css page, but that’s not recommended:
@media screen and (max-width: 1200px)
.ak-container, .boxed-layout .ak-container {
width: 100%;
padding: 40px 10px;
}
I pasted the code in the style.css, but unfortunately, it didn’t change the margins on the homepage.
Try changing the code I gave you before to the following:
.ak-container, .boxed-layout .ak-container {
width: 100%;
padding: 40px 30px;
}
I tried it, but the margins didn’t change. You can find my style.css here, maybe it helps: https://dl.dropboxusercontent.com/u/45391694/style.css.docx
Thanks a lot.
Try pasting the code at the bottom of the following file:
your theme directory/CSS/responsive.css
What is happening is that this file is getting called AFTER your style.css file, and is overwriting your styles. I may still be off on the correct style to use to target it. You have to read the entire stylesheet for responsive themes before you can ferret out the correct styles.
I found the responsive.css file on my FTP server, but the file didn’t open when I clicked on it. I guess I did something the wrong way. I’m sorry, I’m just a beginner in WordPress.
Huh, you should be able to access the file on your FTP server. Who are your files hosted with? You may wind up having to go into the cPanel and look at the file permissions.
Can you download the file, make changes, and then upload it again?
Finally, I could open the responsive.css file and I pasted the code you gave me. But unfortunately, the margins of the body in the front page didn’t change.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What’s your screen size? Why are you editing a theme file? If you’re not using a Child Theme, and if the theme doesn’t have a designated section of the dashboard for CSS modifications then install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin
Then use its “CSS Code” section of the dashboard to hold your CSS modifications.
Alternatively use your Child Theme style.css file to hold your CSS modifications.
My screen resolution is 1280×1024. I have a section on the dashboard for editing the style.css, but I couldn’t find the responsive.css file in the list of files available for editing. So I opened my wp-themes folder to edit the responsive.css.
I started editing my theme file, because I didn’t know how to create a child theme. 🙁
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
My screen resolution is 1280×1024.
So if you reduce down the screen size below 1200 pixels you see the CSS working?
Do you understand what this does:
@media screen and (max-width: 1200px)
?
I reduced the screen size below 1200 px, but the layout of my webpage didn’t change.
I think the code you copied means that the properties written below this code apply to screen sizes where the width is max 1200 px.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I can’t clearly see what was changed and what was default to the original theme, I just recommend to add this to your Child Theme style.css file or Custom CSS plugin:
body .ak-container {
padding-top: 0;
}