CSS to Expand Search Box, When Mouse Move Over

By | July 19, 2013

In most of the search box when we move mouse over on searchbox, it will expand. Here is the css coding for expanding search box,
when mouse mouse over.

CSS

[code type=css]
#text
{
border:2px solid #963;
padding: 3px;
height: 34px;
width: 242px;
transition: 800ms all ease;
}
#text:hover
{
width:280px;
border:2px solid #963;
transition: 800ms all ease;
}
[/code]

FULL CODING

[code type=html]
<html>
<head>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js”>
</script>
<style type=”text/css”>
#text
{
border:2px solid #963;
padding: 3px;
height: 34px;
width: 242px;
transition: 800ms all ease;
}
#text:hover
{
width:280px;
border:2px solid #963;
transition: 800ms all ease;
}
</style>
</head>

<body style=”padding:50px;”>
<input type=”text” id=”text” />
</body>
</html>

[/code]

3 thoughts on “CSS to Expand Search Box, When Mouse Move Over

Leave a Reply

Your email address will not be published. Required fields are marked *