October 19, 201214 yr Okay basically I want a div to change height on hover and text to fade in, onmouse out i want the text to fade out and the div to ease out to its original height, how would i do this? can i do this purely using css or do you have to intergrate something else? heres the css and html.. FORGOT TO MENTION: The div I won't to change on hover is "Description" ignore the other hover styles they aren't what I am talking about. my bad! CSS #body1container { width:300px; height:250px; background:rgba(50,84,28,0.7); -moz-border-radius: 5px; border-radius: 5px; float:left; margin-left:0px; margin-right:40px; } #body1 { width:280px; height:230px; background-image:url(designbgbw.jpg); -moz-border-radius: 5px; border-radius: 5px; float:left; margin-left:10px; margin-right:10px; margin-top:10px; margin-bottom:10px; } #body1:hover { width:280px; height:230px; background-image:url(designbg.jpg); -moz-border-radius: 5px; border-radius: 5px; float:left; margin-left:10px; margin-right:10px; margin-top:10px; margin-bottom:10px; cursor:pointer; } #body1textbg { width:270px; height:auto; background:rgba(50,84,28,0.9); -moz-border-radius: 5px; border-radius: 5px; text-align:left; float:left; margin-left:5px; margin-top:5px; } #description { width:270px; height:13px; background:rgba(50,84,28,0.9); -moz-border-radius: 5px; border-radius: 5px; text-align:left; float:left; margin-left:5px; margin-top:5px; } HTML <div id="mainbody"> <!-- START MAIN BODY --> <div id="body1container"> <div id="body1"> <div id="body1textbg"><h3> Services.</h3> </div> <div id="description"> </div> </div> </div> <!-- END MAIN BODY --> Any kind of help will be appreciated, thanks! Edited October 19, 201214 yr by Willows
October 19, 201214 yr You'd need Javascript and JQuery for something like that. Also, look into CSS3 animations. I've never used them so I can't confirm if they're what you're looking for, but I do know that you'd be better off with JQuery. Edited October 19, 201214 yr by Pete Prosper
October 19, 201214 yr Author You'd need Javascript and JQuery for something like that. Also, look into CSS3 animations. I've never used them so I can't confirm if they're what you're looking for, but I do know that you'd be better off with JQuery. Cool ill check it out!
October 19, 201214 yr You can do it quite easily in css. If you want to support older browsers you'll need to use jquery .animate() or something, though. ~evu.
October 19, 201214 yr Thread title amended. Please don;t use all caps, it's considered shouting and rude.
October 20, 201214 yr Author You can do it quite easily in css. If you want to support older browsers you'll need to use jquery .animate() or something, though. ~evu. Thats great thanks Thread title amended. Please don;t use all caps, it's considered shouting and rude. Sorry pal!
Create an account or sign in to comment