Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I'm already down to one error. The problem was in several table cells (td) I used the background attribute. However I'm told when I go to validate it that background is not an element of (td). If it's not an element, how come my background shows up inside the table cell? Here's a loot at my site:
LaONDaLatina.com
Next, here's the page where I went to validate my site:
W3C Validator
If you look, you'll see the background image is something I have in the left-hand navigation bar so it's not a solid blue. I also had it (and will put it back when I figure out how to do w/o being XHTML non-compliant) in the red left-hand navigation bar as well as the blue bar above it that starts with 'Canales:'. If you want to see what those two navigation bars should look like with the background, look at my forums .

I already tried the idea of using the background image in the (body) tag, but it doesn't penetrate my table cells (i.e. navigation bars). Any suggestions on what I can do. I feel the navigation bars look rather bland as a solid color with out my .gif in the background and I'd take the background over XHTML 1.0 compliance. Any suggestions on what I can do to fix this and be compliant?
BTW: Is there a way to use the background attribute in a style sheet? If there is, it should fix it.

Last edited by donJulio; 11/22/2002 10:21 PM.
Sponsored Links
Joined: Jul 2002
Posts: 22
User
User
Offline
Joined: Jul 2002
Posts: 22
Try this:

< style="background-color: whatever color you want; ">

or

< style="background-color: transparent; ">

which would allow the background to show through.

Using CSS inline style will eliminate the deprecated background element and I believe it is compliant with XHTML but I'm not totally sure. Doesn't hurt to try. I am a novice at this so no guarantees but it did take care of some errors that came up along the way when I was trying to get my site to validate with W3C. Let me know if it works, OK?


Last edited by sisterscape; 11/23/2002 12:53 AM.
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
It didn't work. But even if my site never is W3C compliant, who cares (other than me). You're average web user doesn't even notice what goes on in the source code for a website

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Here is what you do, instead of background="/images/whatever.gif", just use this:

style="background-image:url(/images/whatever.gif)

It is XHTML compliant and works the same way as having the background tag. You could of course set a class attribute on the tag instead and have the background set in your css file instead if you want. It could be a good idea if it's supposed to be in several places.

Joined: Jul 2002
Posts: 22
User
User
Offline
Joined: Jul 2002
Posts: 22
Thanks, Gardener. It was really late last night and the old brain wasn't working 100% . Took a good night's sleep to get it in gear . . . kinda'. Was just about to post the same solution but you beat me to it.

donJulio, just keep in mind that older browsers won't be able to handle CSS very well. That's one reason I don't use it more. Believe it or not, one day I had 40% of my visitors using Netscape 2.0!!

Sponsored Links
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Thanks, Gardener. Now I have no errors. The one thing standing between me and validation is I don't have a particular meta tag that I should. I tried using their suggestion and making my site Unicode (or something), but since it's in Spanish and a lot of the vowels have accents, there were problems and it couldn't be validated. You don't know off hand what I use instead of Unicode for a site in Spanish?
EDIT-Never mind. I think I just figured it out Thanks again!

Last edited by donJulio; 11/25/2002 2:37 PM.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I think the meta tag:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

would still be appropriate for spanish sites.


- Allen wavey
- What Drives You?
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Thanks! Now I'm W3C compliant


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)