Twenty Twelve – Margin at the top
-
I thought that will be an easy fix, but somehow I can’t find where to change this. I would like to have less gray area at the top of the page. I mean this:
https://i.imgur.com/7ozZK.jpgCould anyone tell me where to look in CSS file?
Thx in advance!
Jakub
-
When modifying themes that you haven’t built yourself, it’s best to avoid touching the themes’ files and instead create your own styles.
The easiest option is to use a Custom CSS Manager plugin to write your styles in.
To find which specific CSS values to write, try a CSS-specific forum.
as Twenty Twelve is going to be the next default theme, make sure to create a child theme first, to make the customisation with; https://codex.www.ads-software.com/Child_Themes
then try working with browser inspection tool (such as Firebug) to investigate which styles are responsible for formatting the grey area.
I found out about Child Themes too late and I already made some modifications to the CSS file. Not many, just a couple of values so I guess I will be able to find them and do things properly in future.
But for now I just want this one more change ?? I tried to find it with built in element inspector in Chrome, but didn’t…
Maybe someone will know which property it is, if not I will try again later.
Go back and make a Child theme and move your changes to it. Otherwise you will create a bigger mess for yourself down the road — really.
I figured I would break the cycle of repeating the same thing over and over. You’d think one of these guys could take an extra 5 seconds and add the answer to their rant.
in your child theme style.css find
body .site { padding: 0 40px; padding: 0 2.857142857rem; margin-top: 48px; margin-top: 3.428571429rem; margin-bottom: 48px; margin-bottom: 3.428571429rem; box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); }
simply edit the margin-top
Do not modify any of the theme’s files. Any changes made will compromise the theme and the changes themselves.
everbody can post a ‘quickfix’ css code; (even as a late answer to an month old topic).
those kind of ‘quickfixes’ backfire when the user updates the theme, only to discover that the edits are gone.
imho, the goal of this forum is more to build a solid foundation for customisations – which is exactly what ‘one of these guys’ was doing.
besides, for pure formatting problems there are better suited forums on the web.
please re-read the
@ alchymyth
The original question was about which part of the CSS effects the margin at the top of the twentytwelve theme.
Yes it is a very good idea to use child themes. But simply telling someone over and over to use child themes isn’t enough.
After three responses of nothing but saying “use child themes” you still have the unanswered question of which piece of CSS provides the margin.
Three people saying the same thing only teaches ones thing.
You guys bypassed the original question and provided information about child themes. Which is great. But we still need to know what CSS to edit There are too many people on this forum spending too much time telling people how wrong they are that the original question is forgotten.
I also disagree with your idea of what is a quick fix. I do not consider creating a child theme, and editing the CSS in the style.css to create some customization is a quickfix.
Child themes are meant for that exact purpose. A quickfix would be to edit the style.css in the main TwentyTwelve theme.
It is great to privide other relevant information on topics. But several people repeating the same thing ,and telling others how wrong they are to the point where the initial question is ignored is silly.
I highly doubt that others on this forum would consider building a child theme, and then personalizing the CSS is a quick fix. If that were the case why would every response in this thread talk about the importance of child themes. Even yourself.
Just because something is a month old doesn’t mean it does not deserve an answer. I have seen this question a lot. And all I ever see is “use a child theme” I never actually see which css provides the margin.
Remember, these forums are not meant for CSS-specific support.
WordPress-related solutions will be provided.Users are suggested to use CSS-specific forums for CSS-specific issues.
I accept your rant about how you perceive the previous replies by other members.
as this forum is volunteer driven, anybody joining can make a positive difference – please continue.
however, because we are now entering the general policy question, if and to what extend pure formatting questions are actually related to WordPress and should be anwered in this forum, I stop here.
@ Andrew & alchymyth
If that is the case then this thread should be closed, deleted, or that fact should be stated in the initial response. I’m going to be quiet before I get into trouble..
I’m going to be quiet before I get into trouble..
I’m grateful for your support so far and hope you do continue to provide support.
@steven, thank you very much. It seems quite obvious now when you pointed it out ??
As for the discussion here.. well, I agree with Steven who actually managed to answer my question. As I said before, I do not have too much experience with WordPress and I am learnong on a daily basis just by running my website. I found out about child themes after I altered some things already, so it makes no difference now to change one more thing.
I realize it is a good practice to use them and I will. There is an update for the twenty twelve theme and an update to wordpress that I did not attempt to install yet because I am afraid to loose all the changes I made. I am reading about child themes in my free time and I will fix all those things at once in near future ??
Also, if somebody googles this thread in the future, they will actually find the answer to their problem. They will also find about child themes, but they will be able to fix the margin temporarily.
Cheers
Jakub
[ Signature moderated. ]I forgot to mark it as resolved ??
Also, for simple CSS additions, instead of recommending child themes, I now recommend using the Custom CSS feature included in Jetpack. Much easier to explain and use.
- The topic ‘Twenty Twelve – Margin at the top’ is closed to new replies.