683 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
ChapterThemes
says

I created some admin menu icons for a custom post type and all works fine. Also i wanted to have retina versions, and also that works fine – except for the 32×32 page icon.

On a normal display it shows fine but when i check on my iphone for the retina version i get a big grey dark square instead of the image icon.

The image is there i checked.

I use the following CSS styling:

@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) { .icon32-posts-mycustonpostype { background: url('images/mycustonpostype_icon32_2x.png') no-repeat left top !important; background-size: 32px 32px; } }

Can it be the image? The basic icons from posts and pages show correct…

edit: can’t get readable breaklines inside this code block…

2262 posts
  • Became a Top 20 Author of the Month
  • Had an item that became a weekly top seller
  • Created a helpful tool/app using the Envato API
  • Created a helpful tool/app for Envato Market users
+15 more
revaxarts
says

Check this page: http://kremalicious.com/wp-icons-template/

to format your code use “pre” tags:

@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (   min--moz-device-pixel-ratio: 1.5),
only screen and (     -o-min-device-pixel-ratio: 3/2),
only screen and (        min-device-pixel-ratio: 1.5),
only screen and (                min-resolution: 1.5dppx) { 

.icon32-posts-mycustonpostype {

    background: url('images/mycustonpostype_icon32_2x.png') no-repeat left top !important;
    background-size: 32px 32px;

} 

}
683 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
ChapterThemes
says

That’s exactly the code i’m using, but you couldn’t see ( thx for the pre tag tip )

Anyway, it is this code from kremalicious which i had problems with, but i got it working now.

Turns out if you put an extra !important behind the background-size it shows good!

Don’t know if the problem i had was only on an iphone though…

Thanks

by
by
by
by
by
by