| | |
XHTML: No more cell background images?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
I was just at validator.w3.org testing my site, and it found <td background='bricks.jpg'> as an invalid tag. It said Line 25, Column 29: there is no attribute "background".
I am using XHTML 1.0 Transitional.
Did they really do away with image backgrounds? I can't imagine that they'd want pages to be black and white.
Am I missing something here?
I'm making a webpage for a person, and I want it to be compliant with all browsers, so I was striving to make it XHTML compliant.
He wants a brick pattern as the background for his left ajax menu, but the validator won't let me. What's going on?
Any help is greatly appreciated.
I am using XHTML 1.0 Transitional.
Did they really do away with image backgrounds? I can't imagine that they'd want pages to be black and white.
Am I missing something here?
I'm making a webpage for a person, and I want it to be compliant with all browsers, so I was striving to make it XHTML compliant.
He wants a brick pattern as the background for his left ajax menu, but the validator won't let me. What's going on?
Any help is greatly appreciated.
Hi,
I have viewed My Websites in 4 different browsers and I have never seen a problem going against that code error. I will check yours for you if you would like
I wanted to add that I think they are trying to get people to use css for the backgrounds in tables instead of relying on the HTML code.
I have viewed My Websites in 4 different browsers and I have never seen a problem going against that code error. I will check yours for you if you would like
I wanted to add that I think they are trying to get people to use css for the backgrounds in tables instead of relying on the HTML code. Last edited by tiger86; Sep 2nd, 2008 at 3:59 am.
If I helped you I would appreciate it if you would give me some reputation.
New Social Network in Development offline! Follow on twitter for updates!
Currently developing what should be social network 2.0 .
New Social Network in Development offline! Follow on twitter for updates!
Currently developing what should be social network 2.0 .
In XHTML, the background and bgcolor attributes have been deprecated. This is because they can easily be implemented with css. If you want it to validate, use
However, the best way to do this would be to put these sort of styles in an external stylesheet. This way, it can be cached by the browser and not retrieved repeatedly for each concurrent page that uses the style. This will not only clean up your html, but will also cut down on page load time resulting in a better experience for the user.
HTML Syntax (Toggle Plain Text)
<td style="background-image:url(bricks.jpg)">
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
Thanks for your replies. BuddyLee: I tried that in an external style sheet but it doesn't load the image on the page. Know why? Here is my tag for it:
Thanks
HTML and CSS Syntax (Toggle Plain Text)
TD.MAINCELL{ FONT-WEIGHT: bold; FONT-SIZE: 105%; background-image: url("bricks.jpg"); BACKGROUND: white; COLOR: blue; FONT-FAMILY: "arial", sans-serif }
Thanks
Put the background attribute before the background image. This has to do with the order the browser applies the attribute styles in. I would also try to get away from using all caps for the attributes.
CSS Syntax (Toggle Plain Text)
TD.MAINCELL{ font-weight: bold; font-size: 105%; background: white; background-image: url("bricks.jpg"); color: blue; font-family: "arial", sans-serif }
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
•
•
•
•
Thanks for your replies. BuddyLee: I tried that in an external style sheet but it doesn't load the image on the page. Know why? Here is my tag for it:
HTML and CSS Syntax (Toggle Plain Text)
TD.MAINCELL{ FONT-WEIGHT: bold; FONT-SIZE: 105%; background-image: url("bricks.jpg"); BACKGROUND: white; COLOR: blue; FONT-FAMILY: "arial", sans-serif }
Thanks
Daylight-saving time uses more gasoline
![]() |
Other Threads in the HTML and CSS Forum
- Previous Thread: keeping a consistant line-height when using super-script
- Next Thread: CSS in EI and Firefox - HELP! PLEASE!
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl






