Regarding your link problem, it’s because of this rule in your custom CSS:
.entry .post-content a {
color: #585858;
font-family: Cambria;
}
A rule with a more specific selector prevails over a rule with a less specific selector. As .entry .post-content a
is more specific than .post a
, adding a rule for the latter does nothing.
You should change the above rule to:
.entry .post-content a {
color: #98C1C3;
text-decoration: none;
}
(The font-family
declaration is unnecessary.)
.post a {
color: #98c1c3;
text-decoration: none;
}
text-decoration
is meant for other purposes that the <a>
anchor. Please review the proper use of the CSS (not to be confused with HTML) of this:
http://www.w3schools.com/css/css_link.asp
The reason your sidebar is below the content is because some div layers are missing a closing </div>
tag. This means that your sidebar is being nested inside your post/comments area instead of sitting separately. If you’ve been editing your templates at all lately, you may have accidentally deleted or misplaced some </div>
tags.
Thanks so much, Cyril! That looks fantastic. Really appreciated 🙂
Regarding the </div> tags, I haven’t made any changes to the template (that I know of), I have only fiddled around with the Custom CSS.
How can I fix my sidebar issue?
In your posts, you have loads of unclosed elements like this:
<div style="text-align: left;">
All of your posts seem to start off that way (they shouldn’t – such an element is redundant), but the opening tag is never closed. Similarly, whenever you have a captioned image in your post, the caption is prefaced with <div style="text-align: center;">
, but the opening tag is never closed.
I don’t know how those elements got there or why they aren’t closed, but they are the reason why (1) your sidebar isn’t appearing in the right place and (2) the comments on your posts aren’t being formatted correctly. If the problem only appeared recently, and you didn’t put in those elements yourself, then you need to think carefully back to whether you installed any plugins or made any changes to your template files.
Okay, that makes sense. I do start my posts off that way, the reason being is another CSS issue I can’t figure out, why my posts are stubbornly sans serif when I want them all to be serif (Cambria font).
I thought I had made everything serif in the custom CSS but it doesn’t seem to apply to my posts. Inserting <div style=”text-align: left;”> is the only way I’ve been able to change the font.
If you set the following rule:
.post-content p {
font-family: Cambria;
}
… that should ensure your posts are formatted in the serif typeface. The reason is that although you have set the typeface for .post-content
to Cambria, ordinary text in WordPress posts is by default organised into paragraphs through <p></p>
tags. The default font for all <p></p>
elements is Open Sans. Hence the sans-serif.
———————
For general reference, whenever you put in a tag like <div>
, you must close the element with a corresponding </div>
tag where you want it to end. Otherwise, browsers just don’t know for sure where layout elements start and end.
This goes for the way you are currently doing captions: you have <div style="text-align: center;">
on all of these elements, but you never close these at the end of the caption. (In my view, it’s better in any case to use WordPress’s built-in caption function.)
Thanks, I’ve changed that now and it looks great! I’ll start deleting all my unnecessary div styles. Cheers