What happens when you activate the unedited parent theme?
Thread Starter
RossB
(@rossb)
Hmm, interesting suggestion. I just tried switching to the unedited parent theme, and other than losing all my styling mods (of course), the content is properly centered. So, I must have caused this uncentered content phenomenon with some mod, correct?
Which begs the question, how do I track down what I’ve done wrong? Arrrggghh!
Thread Starter
RossB
(@rossb)
I’ve been scrutinizing my stylesheet for something that might explain this
off-center alignment of the content, and noticed some code that looks weird:
@media screen and (min-width: 600px) {
.site-content article {
margin-left: 42px;
margin-left: 3rem;
}
I’m not sure where I picked this code up from, but almost all my mods have been recommendations from experienced coders here that have worked when I tried them. I’m reluctant to change anything without input from an experienced coder. Could someone pls comment on the above code in the context of this query?
Cheers
Ross
Yes, that appears to be affecting the alignment – you can easily try commenting it out – add comment tags around it:
/*
@media screen and (min-width: 600px) {
.site-content article {
margin-left: 42px;
margin-left: 3rem;
}
*/
to see if that fixes the issue at hand.
Thread Starter
RossB
(@rossb)
Thanks, WPYogi. Comment tags now added to my slowly growing coding education! I assume you use these tags in this current situation – to see the effect of disabling specific code without deleting it?
OK, so commenting that code out DOES center the content alignment, but it messes up a lot of other stuff. eg: the title and header from the home page suddenly appears at the top of every other page (with the header image aligned left instead of center!) + CSS boxes I’ve put around text on a couple of pages disappear.
So, I guess the question now is, how do I center-align the content area without messing up a whole lotta other stuff? If you have any suggestions on this, would be most appreciative.
Cheers
Ross
Thread Starter
RossB
(@rossb)
That’s just crushing. I have no idea what those errors mean or how to fix them.
Seems a few are related to the Nextgen plugin, which I’ve never used! I’ll delete that plugin straight away.
A lot of other errors seem to be something to do with hover buttons, so I could have a look at them, but the rest? Could be quantum physics as far as I know (ie: completely incomprehensible).
WPYogi, do you see any errors among those identified that could be something to do with the content not center-aligning? I think I’ve got to tackle this a bit at a time, or I’m in danger of being overwhelmed and just throwing my hands in the air…so close to finishing this project, and have put ridiculous time into it, so I need to try to keep my head…
SIGH…
Cheers and thanks as ever for your assistance.
Ross
Sorry, didn’t mean to freak you out :). They’re not that bad either – here’s one:
.header-image {
display block;
margin: 2rem auto 2em;
}
You’re missing the colon after “display”
Then you have an extra closing bracket here above .ednotes:
@media screen and (min-width: 978px) {
.parawrapnot {
clear:both
}
}
}
.ednotes
See if that fixes those problems.
I gotta go out for a bit, but I’ll check back in a while :).
Thread Starter
RossB
(@rossb)
Gulp, I am easily freaked out by this stuff, WPYogi – not your fault! I greatly appreciate your help.
Fixed the missing colon – that, and deleting the Nextgen plugin, got rid of 3 errors and 3 warnings!
I’m sure I added that second curly closing bracket to close off two media queries further up the page, but I’m too confused to see why I put them in now. Will go back over my notes and see if I can locate the advice I got re that. Pretty sure that second closing bracket made a difference I wanted to something….but can’t recall what!
I have to go out now, too, so will get back to studying my notes ASAP.
Thanks again for your fantastic support.
Cheers
Ross