html - I want only about half of my bubble to highlight on hover. Can only seem to highlight the whole bubble -
<div id="specials"> <h2><a href="/hot-deals/">we have hot deals unbelievable prices!</a> | <a href="/pre-owned/">we have pre-owned boats!</a></h2> <style> #specials { width:695px; float:left; padding: 0 10px; height:38px; margin:7px auto 10px 13px; background:#bad6e3; border:2px solid #005c8a; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; -webkit-box-shadow: 0px 0px 4px #dbdbdb; /* saf3-4, ios 4.0.2 - 4.2, android 2.3+ */ -moz-box-shadow: 0px 0px 4px #dbdbdb; /* ff3.5 - 3.6 */ box-shadow: 0px 0px 4px #dbdbdb; /* opera 10.5, ie9, ff4+, chrome 6+, ios 5 */ } #specials:hover { width:695px; float:left; padding:0 10px; height:40px; margin:5px auto 10px 13px; background:#005c8a; border:2px solid #005c8a; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; -webkit-box-shadow: 0px 0px 4px #dbdbdb; /* saf3-4, ios 4.0.2 - 4.2, android 2.3+ */ -moz-box-shadow: 0px 0px 4px #dbdbdb; /* ff3.5 - 3.6 */ box-shadow: 0px 0px 4px #dbdbdb; /* opera 10.5, ie9, ff4+, chrome 6+, ios 5 */ } #specials h2 {float:left; margin-top:8px; color:#005c8a; padding-left: 10px;} #specials h2 span {text-decoration:underline;} #specials h2 {color:#005c8a; text-decoration:none; font-size:20px;} #specials h2 span {color:#005c8a;} #specials h2 a:hover {color:#fff;} </style> </div>
well, :hover applied containing <div>
element, not individual <a>
elements, you'll need in order show hover effect on portion of button.
i've created fiddle show how might it: http://jsfiddle.net/tjg8g/
edit
what did...
best bet diff original css , mine main points are:
- no :hover styles on container. apply
:hover
css container<a>
elements instead. - set
<a>
elementsdisplay: inline-block
- muck padding , line-height
<a>
elements , remove padding on h2. - adjust border radius rules on individual elements (so left has curve on left , right has curve on right.) required adding class second a.
Comments
Post a Comment