I say, use chrome.extension.getURL() and set the CSS properties
through JavaScript.
On Jan 18, 1:24 pm, PhistucK <
phist...@gmail.com> wrote:
> Content scripts run within the scope of the web page (only in a 'different
> world', so global variables and events are not shared).
> Use chrome.extension.getURL("images/menu.png") to generate the URL you need
> through JavaScript.
>
> Within a CSS file (somefile.css), unfortunately, you will have to use the
> full URL with an hard coded ID -
> chrome-extension://EXTENSION_ID/images/menu,png
>
> ☆*PhistucK*
>
>
>
>
>
>
>
> On Tue, Jan 18, 2011 at 10:18, Amanda <
mengdong_...@hotmail.com> wrote:
> > I'm working on a extenstion to display a 16x16 image above the
> > original web page.
>
> > In my manifest.json, I specified the image file.
> > "icons": {
> > "16": "images/menu.png",
> > ....}
>
> > And I use content script to create a div and set its backgroud image
> > by CSS.
> > Like this:
>
> > background:url(images/prompt_bg.jpg);
>
> > But there is no image show on the division.
>
> > Could someone tell me what's wrong? Many thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to
chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> >
chromium-extensions+unsubscr...@chromium.org<
chromium-extensions%2Bunsubscr...@chromium.org>
> > .