okay, so I want to put a different background image behind my images than my other (text) p elements. I can get a background behind the images using the img selector, but the problem is that is also inside of a p element, so any background i put on the p elements also gets put behind the img's. So does anyone know of a way to put a background behind just the normal p elemnts (as in the post text/paragraphs) and not behind the post images? Am I making sense? I'm working on this site, if that helps thanks
@AntonNiklasson, I may be in the minority, but I respectfully disagree with you. I find a link to an actual live page/site is far better than a test bed. If a live page is not available, then I agree and think a test bed is better than just posting code (or worse an image, or still worse just trying to describe the problem).
@Ranger, I'm not a wordpress guy, but I can think of three things you could try. The simplest is to use a caption on the image. I believe WP will then wrap the image in a div instead of p. The caption could be just a single space, or you could use CSS to hide the caption with .wp-caption-text {display: none}.
The second thing you could do is use jquery to add a class to p's that have img.
@wolfcry911, I'll give that a try. If I can successfully get the images wrapped in divs instead of p's, that would be great.
@Paulie_D, As far as I'm aware, everything in a wordpress post is wrapped in it's own p tag. It's true the post as a whole is wrapped in it's own div, but each element inside is wrapped in a p tag including each paragraph and image. (images also have an img tag inside said p tag).
I'm working on this site, if that helps
thanks
@Ranger, I'm not a wordpress guy, but I can think of three things you could try. The simplest is to use a caption on the image. I believe WP will then wrap the image in a div instead of p. The caption could be just a single space, or you could use CSS to hide the caption with .wp-caption-text {display: none}.
The second thing you could do is use jquery to add a class to p's that have img. should work.
The third and most technical would be to edit the functions.php so that images would be wrapped in an element of your chosing. courtesy Robert O'Rourke
Surely these should be wrapped in divs with a class of 'post' which then contains paragraphs and images etc.
@Paulie_D, As far as I'm aware, everything in a wordpress post is wrapped in it's own p tag. It's true the post as a whole is wrapped in it's own div, but each element inside is wrapped in a p tag including each paragraph and image. (images also have an img tag inside said p tag).