Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 8
Registered: ‎03-29-2011
My Device: Not Specified

Bizarre file path issue with images and CSS on OS5

I'm struggling with a very odd bug on an OS5 emulator.

I have a page. The file structure is such:

mypage.html
images (folder)
- icon.png (image inside of the images folder)


In the head, I have a standard STYLE block with this:

#icon {background-image: url('images/icon.png')}

And in the body, I have a div with an ID of icon and, sure enough, that image is in the background.

Works fine.

Then, on that same page, in the body I and an IMG tag:

<img src="images/icon.png'" />

If I do that, the image breaks...both the inline image AND the background image previously spec'd in the STYLE block.

If I remove that image, the CSS image shows up again.

If I change the path in the inline image to this:

<img src="../../images/icon.png'" />

Then it works fine again.

Any clue? This is extremely weird.
New Contributor
Posts: 8
Registered: ‎03-29-2011
My Device: Not Specified

Re: Bizarre file path issue with images and CSS on OS5

So...I'm still not entirely sure what's going on but I think this is what's happening:

 

If, via CSS I apply a transparent PNG as a background to an element then any inline transparent gifs on the page end up with a broken image icon.

 

Does this make any sense at all? Are there known issues with transparent PNGs on OS5?

 

My OS6 simulators do not have these issues.