bbr Posted September 30, 2005 Share Posted September 30, 2005 example listed here : http://www.w3schools.com/html/tryit.asp?fi...able_backgroundbut not here :http://www.w3schools.com/tags/tag_table.aspalso,, the w3 validator lists it as being unaccepble for a html 4.01 encoded page.Are there alternatives for writing using a table background, or should a different encoding be used?backgrounds appear to work fine,, so... what's the big "reason" (as ive yet to see it being listed) to making sure the page is 4.01 transitional.btw. looks like the forums are pretty new :> Link to comment Share on other sites More sharing options...
F-Man Posted October 1, 2005 Share Posted October 1, 2005 Hi,bgcolor is depecrated as styles should be reserved to CSS.Enter this code into the head of your document: <style type="text/css"> table { background-color: red; } </style> That's CSS. =)Browsers display it fine because they accept code from different HTML versions, including the older ones. The reason why it is invalid is because using it, no matter how it works in browsers, means you're not actually using the HTML version you're telling in the DOCTYPE, and as the web advances and deprecated attributes start being unsupported by browsers, you'll be left behind. :)And yes, the forums are new. I'm glad to be one of the first members! =) Link to comment Share on other sites More sharing options...
bbr Posted October 4, 2005 Author Share Posted October 4, 2005 images dont classify as styles though. do they?i'm talking about the background "image" :>and thanks for the explanation Link to comment Share on other sites More sharing options...
kelnage Posted October 4, 2005 Share Posted October 4, 2005 Yes, you can use styles to set images as backgrounds. You'd use this instead: table{ background-image: url('image.jpg');} Link to comment Share on other sites More sharing options...
bd1e0d0 Posted October 5, 2005 Share Posted October 5, 2005 Yes, you can use styles to set images as backgrounds. You'd use this instead:table{ background-image: url('image.jpg');} <{POST_SNAPBACK}> I find it easier to just put:table { background: url('back.gif') repeat-x white;} Or something like that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now