vozzek Posted January 27, 2008 Share Posted January 27, 2008 Hi all, I put the W3C Markup Validation checker against my site, and was slapped with 59 errors. After diligently cleaning it up, I'm down to one last error... apparently XHTML 1.0 won't support using the 'background' element within a <td> tag anymore. Correct? I'm assuming the answer is CSS. I've got an external CSS sheet attached to my main template, but I'm not sure how to go about placing the background image into a class. Basically I have a few images I need to appear in certain cells of my table, and I need to write text over them. Sorry if this is confusing, but I'm kinda new to CSS and I'm still not comfortable with it. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/88059-no-more-so-do-i-use-css/ Share on other sites More sharing options...
ptolomea Posted January 27, 2008 Share Posted January 27, 2008 Yes CSS is the way to go I have been messing with it for the past couple of days, learned a little bit about it. this site here has helped me tremendously http://www.w3schools.com/css/default.asp I mainly go to the CSS2 Reference section and CTRL+F to find what i want CSS Help on background http://www.w3schools.com/css/pr_background.asp the answer to your problem i think is Same image in all cells (its either table.td or table td) table.td { background: url(IMAGEURL) no-repeat top left; } Different Image in cells you specify HTML: <td id='image1'> CSS: #image1 { background: url(IMAGEURL) no-repeat top left; } and just make #image2 or which ever you want to call it each time you want a different background for a different <td> Quote Link to comment https://forums.phpfreaks.com/topic/88059-no-more-so-do-i-use-css/#findComment-450594 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.