Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Repeating images in safari

sstree
Discussion topic

Hide all messages in topic

All messages in topic

Re: Repeating images in safari

Reply

Author tfahrner <tfahrner at collab dot net>
Full name tfahrner <tfahrner at collab dot net>
Date 2003-06-25 17:37:40 PDT
Message On Wednesday, Jun 25, 2003, at 17:02 US/Pacific, jrobbins at tigris dot org
wrote:

>> elm.style.background-image =
>> 'url(/branding/image​s/sstree/folder-open​.gif)';
>> elm.style.background-repeat = 'no-repeat';
>
> Done.
>
> Actually, it is elm.style.backgroundImage.

unfortunately, still breaks in Safari. This doesn't fix either:

  elm.style.backgroundRepeat =
  "no-repeat";


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Re: Repeating images in safari

Reply

Author anoncvs
Full name anonymous CVS access
Date 2003-06-25 17:02:30 PDT
Message > elm.style.background-image =
>'url(/branding/i​mages/sstree/folder-​open.gif)';
> elm.style.background-repeat = 'no-repeat';

Done.

Actually, it is elm.style.backgroundImage.

And yes, JavaScript is a pain to use. That is why I tried to
accomplish this with as little JS as possible.

Thanks,
jason!

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Re: Repeating images in safari

Reply

Author tfahrner <tfahrner at collab dot net>
Full name tfahrner <tfahrner at collab dot net>
Date 2003-06-25 12:46:10 PDT
Message On Wednesday, Jun 25, 2003, at 12:04 US/Pacific, jrobbins at tigris dot org
wrote:

>
>> One problem with the tree table is apparent in Safari/OmniWeb, and
>> probably other Konqueror derivatives: the background arrow/folder
>> widget repeats. This is sort of what I'd expect if I understand this
>> and similar lines [[ elm.style.background =
>> "url(/branding/image​s/sstree/folder-clos​ed.gif)"; ]] correctly: you
>> need to specify background-repeat: none explicitly, as the CSS
>> shorthand "background" leaves the repeat at its default, which is to
>> tile on both x and y axes.
>
> I think I fixed this by just adding "no-repeat". Try it now.

no workee.

> I dont have a Mac to test on, so there may be other safari-related
> defects that I have not experienced. I dont see it in my version of
> Konqueror. I thought specifying no-repeat in the original CSS style
> would be good enough.

i'm not familiar with the CSS object model as a script interface, so
may be making some invalid assumptions here, but if one were to write,
all in CSS:

   foo { background-image: url(bar.gif); background-repeat: no-repeat }
   /* and then, someplace later in the cascade */
   foo { background: url(baz.gif) }

the expected behavior would be for foo's background image (baz.gif) to
tile. using the shorthand "background" sets all of the related
background properties back to their default values unless otherwise
stated in the declaration. this is a common stumbling block for many
CSS students, especially in connection with the 'font' shorthand
property. the simplest way to avoid is not to use shorthand casually,
but to set the properties individually, e.g.,

   foo { background-image: url(bar.gif); background-repeat: no-repeat }
   /* and then, someplace later in the cascade */
   foo { background-image: url(baz.gif) }

this will cause baz.gif not to tile.

anyway, either this is a bug in safari/KHTML, or other browsers happen
to get it wrong the same way. a fix/workaround may be to change

     elm.style.background =
'url(/branding/image​s/sstree/folder-open​.gif) no-repeat';

into something resembling (again, dunno the specifics of this largely
nonstandardized DHTML cra, er, stuff)

     elm.style.background-image =
'url(/branding/image​s/sstree/folder-open​.gif)';
     elm.style.background-repeat = 'no-repeat';


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org

Repeating images in safari

Reply

Author anoncvs
Full name anonymous CVS access
Date 2003-06-25 12:04:24 PDT
Message >One problem with the tree table is apparent in Safari/OmniWeb, and
>probably other Konqueror derivatives: the background arrow/folder
>widget repeats. This is sort of what I'd expect if I understand this
>and similar lines [[ elm.style.background =
>"url(/branding/i​mages/sstree/folder-​closed.gif)"; ]] correctly: you
>need to specify background-repeat: none explicitly, as the CSS
>shorthand "background" leaves the repeat at its default, which is to
>tile on both x and y axes.

I think I fixed this by just adding "no-repeat". Try it now.

I dont have a Mac to test on, so there may be other safari-related
defects that I have not experienced. I dont see it in my version of
Konqueror. I thought specifying no-repeat in the original CSS style
would be good enough.

Thanks,
jason!


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@sstr​ee.tigris.org
For additional commands, e-mail: dev-help at sstree dot tigris dot org
Messages per page: