...

View Full Version : CSS rollover question.



Creó
05-16-2005, 04:07 AM
I have this:
-----------------------------------------------------
#enter{
height: 14px;
width: 55px;
text-indent: 0px;
overflow: hidden;
background: url(../images/white/TITLE_enter_css.gif) no-repeat left top;
display: block;
}

#enter:active, #enter:hover{
background-position: 0 -14px;
}

#homemenu_welcome{
height: 32px;
width: 126px;
text-indent: 0px;
overflow: hidden;
background: url(../images/white/home_menu_welcome.png) no-repeat left top;
display: block;
}

#homemenu_welcome:hover{
background-position: 0 -32px;
}

#homemenu_welcome:active, #homemenu_welcome:selected{
background-position: 0 -64px;
}

#homemenu_news{
height: 32px;
width: 126px;
text-indent: 0px;
overflow: hidden;
background: url(../images/white/home_menu_news.png) no-repeat left top;
display: block;
}

#homemenu_news:hover{
background-position: 0 -32px;
}

#homemenu_news:active, #homemenu_news:selected{
background-position: 0 -64px;
}

#homemenu_weblog{
height: 32px;
width: 126px;
text-indent: 0px;
overflow: hidden;
background: url(../images/white/home_menu_weblog.png) no-repeat left top;
display: block;
}

#homemenu_weblog:hover{
background-position: 0 -32px;
}

#homemenu_weblog:active, #homemenu_weblog:selected{
background-position: 0 -64px;
}
-----------------------------------------------------
and with this rate, it's bound to grow exponentially :eek:

How can I condence this when all I want the style to do to my 'buttons' is to displace whatever image or background image it's applied to???

Please help ?!?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum