Could anyone tell me why desktop browsers (Chrome, Safari, Firefox) are showing a CSS background sprite image and the iPhone browser is not?
I have the issue with the social sharing buttons. The first 4 sharing buttons come from the WordPress theme, and the email button was added by me.
The email button is shown on desktop, but not on mobile and I'm not getting why?
I appreciate your help.
Was a problem with selecting classes correctly. Selecting the parent and than the child solved the problem
.parentclass .child {background-size:...;}
.td-sp-share-email is being called for your special email and WhatsApp icons:
ln33:
.td-sp-share-email {
width: 31px;
height: 31px;
background: url("/wp-content/uploads/social-sprites.png") 0px 0px !important;
}
However, you have a rule in style.css?b9d887 that is still setting the background-size property, to 91px 2230px !important:
ln10516:
.td-sp {
background-size: 91px 2230px !important;
}
Your image, social-sprites.png, is only 38px by 76px. Your background-size is the problem.
Update your background-size to what's appropriate and it will work.
Related
I just completed a challenge for FrontEnd Mentor and was texting a friend my demo link to show off/celebrate. But when I went to open the link on my phone I noticed the formatting was all messed up. I've since opened the site on Safari, and the height of the div.selected-plan is getting all messed up.
This is what it looks like on my machine with Chrome.
And the distorted Safari version.
Link to the live site so you can view the html/css.
Why is Safari distorting things and how do I prevent it from happening in the future?
Give below CSS to your SVG I think It Creates height
.music-icon {
margin: 1em;
padding: .25em;
max-width: 48px;
max-height: 48px;
}
This is my site.
I have a problem with the site logo - only in Chrome and Opera, it just moves a little while loading (from left to right) and then jumps back to its place.
I had an issue with Chrome and Opera back in the day with my logo, but I fixed it by adding this code:
#nav-header.nav-container {
margin-left: 165px;
}
(without this code, my navigation overlays logo - of course only in Chrome and Opera).
To notice the issue, you have to refresh the page a couple of times (by clicking on site logo).
I tried adding various css but no luck. What can be responsible for this behavior? It's really odd that it only happens in Chrome and Opera.
Any ideas?
EDIT:
This is the code for site logo:
.site-title a img{
height:40px !important;
position:absolute;
pointer-events:auto !important;
top:-27px;
padding-right:10px;
padding-bottom:5px !important;
padding-top:5px !important;
}
I have an HTML page where I need to render 3 images, one on top of each other.
<div id="preview">
<img src="transparent-image">
</div>
with the following CSS
#preview{
background-image:url(layer0-image), url(layer1-image);
background-size:100%, 100px;
background-blend-mode: multiply;
width: 820px;
height: 350px;
}
The fist 2 images gets blended together using the CSS property background-blend-mode: multiply, on top of this I put the last image (transparent-image) with a transparent background (Imagine a photo of a room, with the wall area being transparent).
The result is exactly what I want but when I try to put
#preview{
width:100%
}
to make it responsive; It works flawlessly, but on ios the transparency is lost.
I tested this behaviour on Chrome, Safari and Firefox (iOS). No problem at all on Chrome, Safari, Firefox on OSX, Android, Windows.
Is there something I'm missing? Thanks for your time.
EDIT:
layer0-image and transparent-image are the same image, layer0-image has no transparency and gets multiplied with layer1-image then on top of this blended image I put transparent-image.
I tried to change transparent-image with another one, the problem seems to be the blending between layer0-image and layer1-image, but due to the fact that layer0-image and transparent-image are the same, at first I thought there was a transparency problem.
The transparency is there, but the div #preview has 0px height when put to
#preview{
width:100%;
height:auto;
}
Showing no blending.
EDIT2:
I'm adding an example to show and replicate the error: https://jsfiddle.net/dyqnghdo/3/
Ok, I finally found the problem. Having:
#preview{
background-image:url(layer0-image), url(layer1-image);
background-size:100%, 100px;
background-blend-mode: multiply;
width: 820px;
height: 350px;
}
and then setting:
#preview{
width:100%;
}
casused the error. To fix it I tried setting:
#preview{
width:100%;
background-size:cover, 100px;
}
The problem is gone even if it's not clear to me why it was happening.
I am using background-size on Chrome and found out it is CSS3 which is not supported in old versions of IE. Hence I have gone through some posts and someone recommended to use this filter:
progid:DXImageTransform.Microsoft.AlphaImageLoader
HTML:
<span class="num_blue_small small"><span class="numberText">4</span></span>
CSS:
.num_blue_small
{
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='/images/num_blue_small.png',
sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/num_blue_small.png', sizingMethod='scale')";
}
.small
{
display: inline-block;
height: 35px;
width: 35px;
text-align: center;
vertical-align: middle;
line-height: 35px;
}
.numberText
{
color: White;
}
By implementing the "filter", it works perfectly in IE7; however, it turns invisible in Google Chrome.
If I include background: url(/images/num_blue_ssc.png) no-repeat; in .num_blue_small CSS class, it will work fine in Chrome but IE 7 will show 2 same images with different sizes.
What should I do to get it fixed?
you could try the background-size polyfill
An IE behavior adding support for background-size to IE8. of Louis Remi
Progressive Enhancement is the mantra I live by. It means "Have fun
with CSS3 and don't worry about IE8 users; they'll never notice
they're missing out on your gorgeous text-shadows and gradients,
anyway".
All was well until I discovered the elegance of background-size:
cover; and background-size: contain;. The first one, for instance,
allows an image to completely cover a background, without having to
send a 1920x1080 background image down the pipes.
Unfortunately, they don't degrade gracefully: websites would likely
appear broken to IE8 users
They offer that feature:
correct position and size of the background image
updated position and size on browser resize
updated image, position and size when the background-image is modified
but seems they have some limitation:
multiple backgrounds (although the :after trick can still be used)
4 values syntax of background-position
any repeat value in background-repeat
non-default values of background-[clip/origin/attachment/scroll]
resizing the background when the dimensions of the element change
I have a legacy web application that is targeted for IE 6 and is being reskinned. The buttons are having the default browser button look replaced with a blue button image.
My following HTML and CSS works fine on IE 8, but not in IE 6.
HTML
<button id="add">Add</button>
CSS
button
{
width: 110px;
height: 28px;
background-image: url('../images/button.png');
background-color: transparent;
border: 0px none #ff0000;
cursor: hand;
font-family: Myriad Pro, Helvetica;
font-weight: bold;
font-size: 12px;
color: #ffffff;
}
Using CSS, how can I get the background image to show in IE 6?
Ideally the fix could be put in an ie6.css to make it easy to remove when IE6 support is eventually dropped.
Please no comments about dropping support for IE6. This legacy application is designed only for IE6 and used internally at an organisation where IE6 is the ONLY supported browser.
If the recesses of my memory on IE6 serve me well, it does not recognize background-image on a button element. Nothing you can do about it.
Although, again based on memory, if you can change it to an input (attribute type="image") you might be able to get the effect you want even on IE6.
Using the background CSS property instead of the background-image property does the trick as described in this blog post (excerpt below).
The background-image property that worked in Firefox 2.0 just did not
have any effect on IE6. After a bit of googling, I realized that the
background-image property will not work on IE and that we need to use
the background property.
This is what works for me:
button
{
background: transparent url('../images/button.png') no-repeat top;
}