a classic css mistake

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

On the Drupal forums a student tried to set the fieldset bg color with

#webform-component-etoq_shines fieldset {
background-color: #ff333;
}

Can you spot the problem?

Read the solution here :~)

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Ah yes, that could be a tricky one to find by only scanning the code. I think that it would become more obvious when you view the page and it's not the color you want.

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

actually, the five character code generated no color, leaving one to wonder if the correct style object was being referenced... it can be tricky in Drupal with so many stylesheets and constructors... (right Liam?)

I copied the page and put an inline style on the fieldset and it changed color, because I typed in the correct hex code... but then copy&paste didn't work in the definitions in the head...

Finally I spotted the problem and kicked myself in the butt all the way across the room

I think the original post on the Drupal community was so earnest and detailed (and "Stinky" repeated the same mistake 5 times) which also threw me off the track...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.