Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: Repeating images in safari

sstree
Discussion topic

Back to topic list

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

« Previous message in topic | 2 of 4 | Next message in topic »

Messages

Show all messages in topic

Repeating images in safari anoncvs anonymous CVS access 2003-06-25 12:04:24 PDT
     Re: Repeating images in safari tfahrner <tfahrner at collab dot net> tfahrner <tfahrner at collab dot net> 2003-06-25 12:46:10 PDT
         Re: Repeating images in safari anoncvs anonymous CVS access 2003-06-25 17:02:30 PDT
             Re: Repeating images in safari tfahrner <tfahrner at collab dot net> tfahrner <tfahrner at collab dot net> 2003-06-25 17:37:40 PDT
Messages per page: