[css-d] problem getting an *inline* css rollover to work

2006-05-15 Thread OpenMacNews
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

hi all.

i'm working on some dynamic css-menu building.

i'm trying to get an inline-css rollover to behave.

i've got an a tag of:

a class=menuButton
   style={background-image: url($image_name);} :hover{background-image:
url($image_name_hvr);}
/a

the goal, of course is, when hover over the a block's background
image, flip the display to the hover-image.

in this form, this *has* to be done inline as $image_name 
$image_name_hvr are *dynamically* generated in a parent, php loop ...

problem is, $image_name display correctly.  but i can't get that silly
second, hover image to display ...

i'm guessing it's either a syntax problem with my inline-css, or i'm
approaching this all wrong ...


thoughts/suggestions?

cheers,

richard
- --

/\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \   micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRottcACgkQlffdvTZxCMZg5gCeNNz9lRamphWWmUUrsmiw+Dw+
6FcAoLwrIlgSpCVBusmbrSVzYHOaopsX
=4Q55
-END PGP SIGNATURE-

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] problem getting an *inline* css rollover to work

2006-05-15 Thread Els
OpenMacNews wrote:


 i'm trying to get an inline-css rollover to behave.

 i've got an a tag of:

 a class=menuButton
   style={background-image: url($image_name);}
 :hover{background-image: url($image_name_hvr);}
 /a

Did you try validating that?

 the goal, of course is, when hover over the a block's
 background image, flip the display to the hover-image.

 in this form, this *has* to be done inline as $image_name 
 $image_name_hvr are *dynamically* generated in a parent, php
 loop ...

has to be done - what if it can't?
Hint: it can't.

 problem is, $image_name display correctly.  but i can't get
 that silly second, hover image to display ...

Because :hover is the selector, not the style. Inside the style 
attribute, you can only write styles, not selectors.

 i'm guessing it's either a syntax problem with my inline-css,

HTML validator is your friend:
http://validator.w3.org/

 or i'm approaching this all wrong ...

Can't you generate this second image name into the head of the 
document?
Like so:

style type=text/css
a.menuButton{
background-image: url($image_name);
}
a.menuButton:hover{
background-image: url($image_name_hvr);
}
/style
/head
body
...
a class=menuButton.../a

-- 
Els
http://locusmeus.com/
http://locusoptimus.com/

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] problem getting an *inline* css rollover to work

2006-05-15 Thread OpenMacNews
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

 Can't you generate this second image name into the head of the document?

splitting  moving the per-image-name style-creation logic into php in
the head, then, looping again over image-names/styles in the body did
the trick.

thx!

- --

/\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \   micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRoxv8ACgkQlffdvTZxCMbCmQCfYeWrooJQ21TwqLx70DpJo6EL
UFMAn3St/exPAvnIvB20K5y4+EAiZd1d
=ixdO
-END PGP SIGNATURE-

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/