So, what I want to do is have the first image that shows up on a blog post fit the width of the post so it looks like a headline image. however, I need the text that comes after it in the <p> elements to have a right and left padding of 10px and I want it to do the same for each and every <p> that comes after an <img>
This is what I've got...and it works for the <img> element if I switch the P and IMG, but that defeats the purpose of what I want to do...so! Here's what I've got so far. Any input is greatly, greatly appreciated. It looks so simple but it's just not working and I'm relatively new with pseudo-classes...so I've got no idea:
img > p:first-child {
padding-left: 10px;
padding-right: 10px;
}
Thanks!