Click to See Complete Forum and Search --> : Target Parent Container's Child CSS


robindean
08-19-2007, 08:03 PM
I have a parent div ('email_shell') with two child divs ('email_subscribe' and 'email_image').

The first child div ('email_subscribe') is covered completely by a transparent input type="image" file ('email_image').

I want for this input's active state to visually affect the first div ('email_subscribe') in the parent div ('email_shell') using only css.

How?

KDLA
08-20-2007, 09:12 AM
Provide some of your code, and we can probably tell you. It's very difficult to do so without it.

robindean
08-20-2007, 02:04 PM
#email_shell {height: 21px;}
#email_focus {width: 193px; height: 19px; border: 1px solid #aaaaaa; float: left; overflow: hidden; cursor: text;}
#email_input {width: 185px; height: 18px; margin: -1px 0 0 -1px; border: 0; padding: 3px 5px 0 5px; background: transparent; font-size: 12px; font-family: verdana, arial, helvetica; font-weight: bold; color: #ddaa33; float: left;}
#email_submit {float: right; overflow: hidden;}
#email_subscribe {width: 84px; height: 15px; border: 1px solid #aaaaaa; padding: 2px; text-align: center; font-weight: bold; color: #ddaa33;}
#email_image {width: 90px; height: 21px; margin-top: -21px; cursor: default;}

<div id="email_shell">
<form method="post" action="newsletter/add.php">
<div id="email_focus">
<input type="text" id="email_input" value="Your Email Address">
</div>
<input type="hidden" value="Newsletter">
<input type="hidden" value="text">
<div id="email_submit">
<div id="email_subscribe">
Subscribe
</div>
<input type="image" src="submit.png" id="email_image"></div>
</form>
</div>

When "email_image" is active I want the border, background and text color to change in "email_subscribe" without the use of javascript.