RE: [WSG] obj.style.backgroundImage
Since no-one else has replied, perhaps I may ask why you would want to do this? Mike -Original Message- From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED] On Behalf Of Thierry Koblentz Sent: Wednesday, October 04, 2006 2:05 AM I'm curious to know if anyone here have successfully applied a background image to an IMG element through scripting? I can apply a background color but I can't make style.backgroundImage work. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] obj.style.backgroundImage
Christian Heilmann wrote: I'm curious to know if anyone here have successfully applied a background image to an IMG element through scripting? Have you tried to set the image to block first? Also, just do obj.style.background = 'url(bla.gif) #fff no-repeat' instead of backgroundImage Argh! I'm so stupid. I was using an_image.gif' but the file name was: an_image.jpg I'd checked the spelling of the file name *many, many* times, but totally missed the extension. It reminds me of the time when I used to write colour instead of color... :-( Duh! Thanks. --- Regards, Thierry | www.TJKDesign.com *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] obj.style.backgroundImage
[EMAIL PROTECTED] wrote: Since no-one else has replied, perhaps I may ask why you would want to do this? I'm working on a variation of this: http://www.tjkdesign.com/articles/png_overlay_with_no_extra_markup.asp --- Regards, Thierry | www.TJKDesign.com *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] obj.style.backgroundImage
From: Thierry Koblentz [EMAIL PROTECTED] document.getElementById('column1').style.backgroundImage=url('c1.jpg'); We usually don't use that method (haven't had a need to yet). We often do similar tasks by changing classes. That's what I do this with pure CSS solutions [1], but when JS is used I just don't see a reason for binding the images to the stylesheet. [1] http://www.tjkdesign.com/articles/css%20pop%20ups/6.asp It depends on your purpose, your style, and your target audience - I imagine :-) *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
[WSG] obj.style.backgroundImage
I'm curious to know if anyone here have successfully applied a background image to an IMG element through scripting? I can apply a background color but I can't make style.backgroundImage work. --- Regards, Thierry | www.TJKDesign.com *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***