The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Background color for certain drop down menu option.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #36016

    I’ve been working on this for the last half hour or so and can’t seem to come up with a solution. I’m hoping I can do this by only editing the CSS or only the CSS and the PHP below.

    What I am trying to do is make each option have its own unique background and text color. Red would have a Red background and White text where Black would have a Black background with White text and Yellow would have a Yellow background and Black text.

    Maybe someone can come up with the answer. I know CSS isn’t extremely complex, but I am stumped and someone may find this very useful.

    If you have any ideas, please post and I can try it out. I’ll be here all week :)

    Thanks for looking.

    …and here is my code:



    Imprint Color:



    I don’t know much PHP, but would there be a way to give each one a random background colour excluding those given before, and then give the one with that background a color of the opposite colour?
    Otherwise I’d just do it by hand.


    Have you seen this article?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.