579 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
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…

2001 posts
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 4-5 years
  • Austria
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Microlancer Beta Tester
+3 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;

} 

}
579 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
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