Jump to content

Bgcolor = "#ffffff" Turns Yellow...wtf?


skaterdav85
 Share

Recommended Posts

So I created a website for a class project, and i have an online quiz in a table with alternating colors for each row. http://followthemusic.net/ISE544/quiz1.phpBecause this is a school project and the teacher wont care or notice the difference, i used bgcolor instead of css. (I know this is bad practice, but I was being lazy :) )

bgcolor = "#ffffff"

and

bgcolor = "#eeeeee"

For some reason in IE, this yields yellow. Why?

Link to comment
Share on other sites

I don't see why you wouldn't use CSS since you're already using a stylesheet. And the class/teacher doesn't care about validation? And tables for non-tabular data?Anyway, maybe try using all six letters? Or for a better experience for IE users, consider using a strict DTD.

Link to comment
Share on other sites

ya you're right. I am using a style sheet so I can easily just switch that. Its not a web development class. Its a project for a fictional company where we're delivering training materials via "the most up-to-date online methods". So the teacher will only see the end product. He wont care about how the site was made, and in 2 days, the site wont even matter haha. But I'm still curious, why did it come out yellow? I used all 6 letters for the hex value. Is this maybe due to IE deprecating the bccolor attribute?

Link to comment
Share on other sites

I saw this once before, maybe a month ago. That time, I believe, the mystery color was green. All I can imagine is that bgcolor is so poorly supported its behavior is unpredictable. Personally, I find that worse than being unsupported. Zero result is better than a weird result, and much easier to debug.

Edited by Deirdre's Dad
Link to comment
Share on other sites

yeah, see what happens if you make the color a class and apply it to the table elements. I think I remember what DD was talking about with the mystery color thing, and it's most likely bgcolor.

Edited by thescientist
Link to comment
Share on other sites

I know in XHTML all value are supposed to be lowercase, so if anything, they should all be #ffffff, #eeeeee, etc.

Edited by thescientist
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...