Hi I am working on this site for hotel reservations. I have a search form and a contact form in a contact page. I set the style for the search form to background:#C00000. When I created the contact page I realized that my contact form background gets the same color because of the css. Is there a way to apply a different background color to the contact form? Seems easy but I don't seem to be able to do it, I get all sortsof strange things.Thank you

Recommended Answers

All 2 Replies

There are quite a bit of methods and its difficult to guide you without seeing any code. However in general, you can apply different styles to the same types of elements by targeting them via CSS selectors. For example, you can assign unique IDs to each element and target them like this..

 #elementID { background-color: #fffff; }

Seeing your relevant code would be helpful.

Hi, here is the code the search form I coded myself, the contact form I downloaded it.Hope this will help.I don't know if I'll be using the downloaded code for the contact form or if I'll do it myself(try it I mean)but the issue will apply in any case I like the 2 forms to have a different background color.Thanks a lot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.