View Full Version : CSS question
I think I have seen this, but I can't figure out how to do it (assuming it's possible).
I want to make a div change backgrounds using 'hover'. I can make the linked text within the div do it, but I want the entire div to change. Can that be done?
<style>
.hoverme { background: #ccc; width: 300px; height: 100px;}
.hoverme:hover { background: #f33; }
</style>
<div class="hoverme">test
test
<a href="http://google.com/">Google</a>
test
</div>
It is the same as doing an <a> tag, you just apply the hover styling to the block you want.
<style>
.hoverme { background: #ccc; width: 300px; height: 100px;}
.hoverme:hover { background: #f33; }
</style>
<div class="hoverme">test
test
<a href="http://google.com/">Google</a>
test
</div>
It is the same as doing an <a> tag, you just apply the hover styling to the block you want.
YES perfect. (I was very close |angry| )
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.