Jump to content

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


skaterdav85

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.

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.

Link to comment
Share on other sites

Hi, in the development tools of ie8, the bgcolor is equal to #eee0 and #fff0, it would be very weird but, what happens if you set the color in upper case? (#EEEEEE, #FFFFFF)

Link to comment
Share on other sites

Note: there is no convention for writing hexadecimal in upper- or lowercase either.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...