So I assume you want each post in it’s own red box. The problem is that the CSS for the red box that you see around all the posts is in the parent #blogContent container, and not for each individual post.
So you’ll need two rules, one that removes the box around the parent element, and another that adds the box around the individual posts:
#blogContent {
background-color: #000;
border: none;
padding: 0;
}
#blogContent .post {
background-color: #660000;
border: 2px solid #ff0000;
padding: 30px;
}
By the way, you shouldn’t add your custom CSS to the theme’s style.css file. If you ever update the theme, your changes will be overwritten. Best thing is to copy your custom CSS to WordPress’ Custom CSS option (Appearance → Customize → Additional CSS).
Thread Starter
frza45
(@frza45)
Thanks so much! That worked!
New problem: The width of the posts is about half of what it needs to be now. I have tried putting in width: 100% about everywhere that is logical. It looks ok when I put in width: 170% under #blogContent .post but I’m sure there’s a better way. Am I just getting into trouble with my containers like with my last problem?
I would appreciate a bit more help with this.
Thanks!
The problem with setting the post widths to 170% is if you look at the site on a mobile device (cell phone), you’ll see that the posts are going to extend past the right edge of the screen.
There’s another parent element that you can set to 100% instead:
#content {
width: 100%;
}
Thread Starter
frza45
(@frza45)
Great! Thanks! This is my first conversion to wordpress and it’s pieced together from various tutorials, so I do not entirely understand it as a whole yet.
I appreciate the help! Maybe one day I can help someone else! You are tha masta!