user1667346
user1667346

Reputation: 17

applying css to a form with div

my form is

<div id="search">
    <form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)">
        <input name="q" type="hidden" />
        <input name="qfront" type="text" style="width: 80px" />
    </form>
</div>

in styles css i have put

#search {font: 12px  'Arial', sans-serif; color:#fff; text-align:left}

however the form is still not showing the white colour

Upvotes: 0

Views: 75

Answers (1)

thirdender
thirdender

Reputation: 3951

INPUT elements generally do not inherit color or font styles from the surrounding text by default. For example, in an area with blue text, the color of the INPUT value is still going to be the browser default (usually black). To override this, you need to target the INPUT specifically. In your case, try:

#search input { font: 12px 'Arial', sans-serif; color:#fff; }

Upvotes: 3

Related Questions