You don't want to be playing with background position, rather use your
favourite method to make the  a  smaller than the enclosing  li  for
example set a margin-left on the   a  that is equal to the width of the
icon on the li.

Regards,
Mike
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of kevin mcmonagle
Sent: 08 December 2008 16:16
To: wsg@webstandardsgroup.org
Subject: [WSG] hover state on icons(indivdual li backgrounds)

Is it possible to get two images into an li anchor if each background
image or icon is unique.
All the online tutrials that ive found are for list items that share a
common background image - but this must have been done before.


heres the css ive tried:

 #home a{background-image:url(../images/icons/home.gif);
 background-repeat:no-repeat;background-position:-4px 1px; }
 

 a.home{
background-image:url(../images/icons/homeover.gif);
 background-repeat:no-repeat;background-position:-94px 1px; }


 a.home:hover{
background-image:url(../images/icons/homeover.gif);
 background-repeat:no-repeat;background-position:-4px 1px; }


In the xhtml ive tried both these scenarios and different combinations
of ids/classes on the above css.

<li id="home" >< a href"#" class="home">Home</a> <li id="home"
class="home">< a href"#">Home</a>

The problem is that once one background is in the anchor or li i cant
get another to reposition over it...
Unless someone has a better idea Im thinking about doing something dirty
like wrapping a span around the li's.


If this doesnt make any sense to you here is my very under-construction
example:
http://www.gortahork.eu/en

-best
kevin



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to