Hi, I need to embed a simple table within a WordPress post (a page). I know it's not a good idea, but this time I really need to. Wanted to use a background image for one table cell but I cannot get the no-repeat attribute to work. I've tried both out-dated HTML and CSS but the background image is still cloned and copied. Tried to use DIV... doesn't work. Why is this thing so stubborn? Any ideas?
Can you post the code you're using to display the background image? Basically it should be something like: {background:url('myimage.jpg') no-repeat;} Is that what you've tried?
Thank you for your reply. Actually, I've ended up with this <td style="background-image: url('http://www.lol.com/review-bckgr.gif'); top left background-repeat: no-repeat;"> Code (markup): I have also tried to set a class for a TD and get it all into the stylesheet but it doesn't make any difference.
Try this: Take off "-image" and just use a general background style. Also, take out "background-repeat" and switch the repeat declaration with the position. You should end up with: <td style="background: url('http://www.lol.com/review-bckgr.gif') no-repeat top left;">
Mmh, no, it doesn't display any background at all, and besides if you remove the semi, you won't get it working on a Safari (not that I'm too bothered, though). Looks like I'd have to go without the background. I suspect it has something to do with my theme. Either there's a stray DIV or there's a parent element that keeps the background cloning.
Hmmm... Did you see my edit? I missed a couple things so I re-did my post. (Sorry!) Let me know if you try the new code. : )
Basically, it looks like you're combining a couple types of style here. (Maybe as a result of the different things you were trying?) There's the background-image style, which takes the file path as a value. The background-position, and also the background-repeat. But, in order to use them together you need to just use the background style. (See the code from two posts ago.) Or, list them seperately, such as: <td style="background-image: url('http://www.lol.com/review-bckgr.gif');background-position: top left; background-repeat: no-repeat;"> (Hope that made sense.)