PDA

View Full Version : Color question


shobson
Dec-29-2005, 04:31 PM
Our site is at http://davidhobson.smugmug.com/

I changed the color of all the green text to a gold with this code:

*REPLACE GREEN TEXT*
.title,
*.title,
* .title,
.box .title {
color: #877C58;
}

When I view the site in IE it looks fine, but in Firefox it's still green. I must've missed something.

Thanks for helping - it's starting to come together!

Stephanie

Mike Lane
Dec-29-2005, 04:44 PM
Our site is at http://davidhobson.smugmug.com/

I changed the color of all the green text to a gold with this code:

*REPLACE GREEN TEXT*
.title,
*.title,
* .title,
.box .title {
color: #877C58;
}

When I view the site in IE it looks fine, but in Firefox it's still green. I must've missed something.

Thanks for helping - it's starting to come together!

Stephanie

I'm thinking to myself... geeze what went wrong. I've used that exact code several times...

Then (boom!) it hit me...duh.

It is this that is messing you up:

*REPLACE GREEN TEXT*

Add the slashes (in red) to make it work:

/*REPLACE GREEN TEXT*/

Without the slashes you've got a very confusing situation for CSS interpreters (i.e. browsers). IE sucks that's why it's different.

shobson
Dec-29-2005, 05:05 PM
Thanks Mike... that fixed it. And now it's perfectly obvious, of course.

Reminded me of something else I wanted to know. Is there a way to leave some code but disable it? So if you want it back you can just re-able (is that a word?) it.

Stephanie

Allen
Dec-29-2005, 05:14 PM
Just place /* ........ */ around the code.
AL

shobson
Dec-29-2005, 05:18 PM
OK, that makes sense. I think I tried that, but only put it around part of the code, like the first line.

Thanks,
Stephanie