Wrong overflow cropping in element with border-radius on Opera - overflow

Ok, so I've made this FC Barcelona CSS logo and everything works fine under:
Firefox 13
Chrome 20
Safari 5
IE 9
BUT on Opera 11 (and 12 too) those blaugrana stripes are not cropped. I have tried many configurations, with and without additional wrapper, but I couldn't get it work.
HTML:
<div id="blaugrana_stripes_container" class="abs border_black fill_purple cropper layer9 rounded">
<!-- Wrapper needed for some browsers to crop overflow properly -->
<div id="blaugrana_stripes_overflow_cropper" class="rounded">
<div class="blaugrana_stripes fill_purple border_blue"></div>
<div class="blaugrana_stripes fill_purple border_blue"></div>
</div>
</div>
related CSS:
#blaugrana_stripes_container, #blaugrana_stripes_overflow_cropper {
width: 244px;
height: 244px;
text-align: left;
-moz-border-radius: 155px 155px 134px 134px;
-webkit-border-radius: 155px 155px 134px 134px;
border-radius: 155px 155px 134px 134px;
}
#blaugrana_stripes_container {
left: 36px;
top: 62px;
border-width: 2px;
-ms-transform: scaleY(0.79);
-moz-transform: scaleY(0.79);
-webkit-transform: scaleY(0.79);
-o-transform: scaleY(0.79);
transform: scaleY(0.79);
z-index: 3;
}
#blaugrana_stripes_overflow_cropper {
overflow: hidden;
white-space: nowrap;
}
.blaugrana_stripes {
height: 100%;
width: 35px;
border-width: 0px 35px 0px 35px;
margin-right: 35px;
display: inline-block;
}
.cropper {
overflow: hidden;
font-size: 0;
margin: 0px;
padding: 0px;
border: none;
}
.abs {
position: absolute;
}
I've copied it here because there's a lot of code, so maybe it will help. Above I've skipped classes used for decorating (border_black fill_purple), z-indexing (layer9) and javascript mechanisms (rounded) because I think they're not related with problem.
Of course everything is viewable via Firebug or other developer tools on the demo site.
Any suggestions?

I don't know why this is buggy in Opera, but you can use gradient (see code below). It is not working in IE (tested with version 9).
.blaugrana_stripes{display:none;}
#blaugrana_stripes_overflow_cropper{
background: #0b2f89;
background: -moz-linear-gradient(left, #0b2f89 0%, #0b2f89 14%, #980f39 14%, #980f39 28%, #0b2f89 28%, #0b2f89 42%, #980f39 42%, #980f39 57%, #0b2f89 57%, #0b2f89 71%, #980f39 71%, #980f39 86%, #0b2f89 86%, #0b2f89 99%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#0b2f89), color-stop(14%,#0b2f89), color-stop(14%,#980f39), color-stop(28%,#980f39), color-stop(28%,#0b2f89), color-stop(42%,#0b2f89), color-stop(42%,#980f39), color-stop(57%,#980f39), color-stop(57%,#0b2f89), color-stop(71%,#0b2f89), color-stop(71%,#980f39), color-stop(86%,#980f39), color-stop(86%,#0b2f89), color-stop(99%,#0b2f89));
background: -webkit-linear-gradient(left, #0b2f89 0%,#0b2f89 14%,#980f39 14%,#980f39 28%,#0b2f89 28%,#0b2f89 42%,#980f39 42%,#980f39 57%,#0b2f89 57%,#0b2f89 71%,#980f39 71%,#980f39 86%,#0b2f89 86%,#0b2f89 99%);
background: -o-linear-gradient(left, #0b2f89 0%,#0b2f89 14%,#980f39 14%,#980f39 28%,#0b2f89 28%,#0b2f89 42%,#980f39 42%,#980f39 57%,#0b2f89 57%,#0b2f89 71%,#980f39 71%,#980f39 86%,#0b2f89 86%,#0b2f89 99%);
background: -ms-linear-gradient(left, #0b2f89 0%,#0b2f89 14%,#980f39 14%,#980f39 28%,#0b2f89 28%,#0b2f89 42%,#980f39 42%,#980f39 57%,#0b2f89 57%,#0b2f89 71%,#980f39 71%,#980f39 86%,#0b2f89 86%,#0b2f89 99%);
background: linear-gradient(to right, #0b2f89 0%,#0b2f89 14%,#980f39 14%,#980f39 28%,#0b2f89 28%,#0b2f89 42%,#980f39 42%,#980f39 57%,#0b2f89 57%,#0b2f89 71%,#980f39 71%,#980f39 86%,#0b2f89 86%,#0b2f89 99%);
}

There's an even cleaner way of using gradients:
#blaugrana_stripes_container {
background-image: -o-linear-gradient(0deg, #0B2E89 50%, #980F39 50%, #980F39);
background-size: 70px 50px;
}
You can just get rid of anything inside #blaugrana_stripes_container.
The above CSS gradient made compatible with all browsers can be found here.
Code stolen from Lea Verou.

Opera 12.01 fixes this issue, however there's another bug not related with this topic. I know this is not a solution, but I wanted to make it more visible than comment.

Related

Background-attachment fixed with transform not works in Firefox 2018

Hello everybody I have a problem with my code under, background-attachment fixed work only when I remove transform: rotate() in Firefox and IE instead working great in Chrome.
This is my HTML
<div class="para">
</div>
This is my css
.para{
z-index: -100;
height: 160vh;
width: 100%;
margin-top: -40rem;
background: url("back1.jpg") no-repeat center;
background-size: cover;
background-attachment: fixed;
-webkit-clip-path: polygon(0 22%, 100% 0, 100% 79%, 0% 100%);
clip-path: polygon(0 22%, 100% -800px, 100% 60%, 0% 100%);
transform: rotate(10deg);
}
So for being clear when I remove translate property is working everywhere when I add it is working only in chrome.

Flickering CSS animation on IE only

I have following code running fine on modern browsers, except IE11 :
A simple pseudo-element animated to rotate indefinitely.
#keyframes spin{
0% {
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#-moz-keyframes spin{
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(360deg);
}
}
#-webkit-keyframes spin{
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
.spin-container{
position: relative;
width: 400px;
height: 300px;
margin: 2em auto;
box-sizing: border-box;
}
.spin-container::after{
content: "";
position: absolute;
display: block;
opacity: 1;
border-color: rgba(0, 0, 0, 0.2) green green rgba(0, 0, 0, 0.2);
border-radius: 100%;
border-style: solid;
border-width: 10px;
width: 100px;
height: 100px;
bottom: 50px;
right: calc(50% - 50px);
border-radius: 100%;
-webkit-animation: spin 1s linear infinite;
-moz-animation: spin 1s linear infinite;
-ms-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
<div class="spin-container"></div>
I've been looking for a reason for weeks now, and I cannot determinate a property that can cause this.
I first suspected a transform-origin to not be the center of my pseudo-element spinner, but it appears that default value is 50% 50% 0 for every browser.
Then I looked into z-axis modification, or crazy inheritance, but I definitely found nothing.
Does anyone know why this flickers on IE11, and not on other browsers ?
IE11 has some issues related to hardware acceleration and CSS animation:
IE 11 Leaving Artifacts and not redrawing screen
CSS Transition Property not working for SVG Elements
Microsoft is only fixing security related issues in IE11, so this will most likely remain unfixed.

IE8 IE9 drop down menu inline error

My CSS Menu bar has a little problem. The bar works fine in all the other major browsers including IE10, but not in IE 8 or 9. It seem like the float or the inline-block is being ignored. They are shown as stacked on top of one another instead of side by side. If you have IE 8 or 9 you can view the problem at kitchenova.com. I have made a jsfiddle of the menu bar: http://jsfiddle.net/bLZzL/
IE will always be a pain!
#cssmenu ul,
#cssmenu li,
#cssmenu span,
#cssmenu a {
margin: 0;
padding: 0;
position: relative;
font-family:Verdana, Geneva, sans-serif
}
#cssmenu {
height: 30px;
border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0px 0px;
-webkit-border-radius: 5px 5px 0 0;
background: #E0E0E0;
background: -moz-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFFFFF), color-stop(100%, #E0E0E0));
background: -webkit-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: -o-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: -ms-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: linear-gradient(to bottom, #FFFFFF 0%, #E0E0E0 100%);
border-bottom: 2px solid #EB2226;
z-index:999;
}
#cssmenu:after,
#cssmenu ul:after {
display: inline-block;
float:left;
}
#cssmenu a {
background: #E0E0E0;
background: -moz-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFFFFF), color-stop(100%, #E0E0E0));
background: -webkit-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: -o-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: -ms-linear-gradient(top, #FFFFFF 0%, #E0E0E0 100%);
background: linear-gradient(to bottom, #FFFFFF 0%, #E0E0E0 100%);
color: #000000;
display: inline-block;
font-family: Verdana, Geneva, sans-serif
font-size: 15px;
line-height: 29px;
padding: 0 20px;
text-decoration: none;
}
#cssmenu ul {
list-style: none;
}
#cssmenu > ul {
float: left;
}
#cssmenu > ul > li {
float: left;
}
#cssmenu > ul > li:hover:after {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: 50%;
bottom: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid #EB2226;
margin-left: -10px;
}
#cssmenu > ul > li:first-child > a {
border-radius: 5px 0 0 0;
-moz-border-radius: 5px 0 0 0;
-webkit-border-radius: 5px 0 0 0;
}
#cssmenu > ul > li:last-child > a {
border-radius: 0 5px 0 0;
-moz-border-radius: 0 5px 0 0;
-webkit-border-radius: 0 5px 0 0;
}
#cssmenu > ul > li.active > a {
}
#cssmenu > ul > li:hover > a {
background: #070707;
background: -moz-linear-gradient(top, #FFFFFF 0%, #BBBDBF 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFFFFF), color-stop(100%, #BBBDBF));
background: -webkit-linear-gradient(top, #FFFFFF 0%, #070707 100%);
background: -o-linear-gradient(top, #FFFFFF 0%, #BBBDBF 100%);
background: -ms-linear-gradient(top, #FFFFFF 0%, #BBBDBF 100%);
background: linear-gradient(to bottom, #FFFFFF 0%, #BBBDBF 100%);
box-shadow: inset 0 0 3px #000000;
-moz-box-shadow: inset 0 0 3px #000000;
-webkit-box-shadow: inset 0 0 3px #000000;
}
#cssmenu .has-sub {
z-index: 1;
}
#cssmenu .has-sub:hover > ul {
display: block;
}
#cssmenu .has-sub ul {
display: none;
position: absolute;
width: 200px;
top: 100%;
left: 0;
}
#cssmenu .has-sub ul li {
*margin-bottom: -1px;
}
#cssmenu .has-sub ul li a {
background: none repeat scroll 0 0 #E5E5E5;
border-bottom: 1px dotted #000000;
filter: none;
font-size: 12px;
display: block;
line-height: 120%;
padding: 10px;
}
#cssmenu .has-sub ul li:hover a {
background: #EB2226;
color:#FFF;
}
#cssmenu .has-sub .has-sub:hover > ul {
display: block;
}
#cssmenu .has-sub .has-sub ul {
display: none;
position: absolute;
left: 100%;
top: 0;
}
#cssmenu .has-sub .has-sub ul li a {
background: #0c7fb0;
border-bottom: 1px dotted #6db2d0;
}
#cssmenu .has-sub .has-sub ul li a:hover {
background: #095c80;
}
This is the list it applies to:
<link href="assets/templates/v32029/css/Dropdown_style(8-6-2013).css" rel="stylesheet" type="text/css" />
<div id='cssmenu' style="position:relative;">
<ul>
<li class='active has-sub'><a href='http://www.kitchenova.com/Bakeware_c_8.html'><span>Bakeware</span></a>
<ul>
<li><a href='http://www.kitchenova.com/Measuring-Tools_c_407.html'><span>Measuring Tools</span></a></li>
<li><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bBaking%20%26%20Pastry%20Tools'><span>Baking and Pastry Tools</span></a></li>
<li><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bCookie%20%26%20Biscut%20Cutters'><span>Cookie and Biscuit Cutters</span></a></li>
<li><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bDecorating%20Tools'><span>Decorating Tools</span></a></li>
<li><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bPans%2c%20Molds%2c%20%26%20Sheets'><span>Pans, Molds, and Sheets</span></a></li>
<li><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bBaking%20Dishes'><span>Baking Dishes</span></a></li>
<li><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bSilicone%20Bakeware'><span>Silicone Bakeware</span></a></li>
<li class='last'><a href='http://www.kitchenova.com/search_results.html?&sn=162062355&e=ajx&srt=0&tag=CATSBakeware%3bMixing%20%26%20Prep%20Bowls'><span>Mixing and Prebowls</span></a></li>
</ul>
On you HTML code you used one TABLE above
<link href="assets/templates/v32029/css/Dropdown_style(8-6-2013).css" rel="stylesheet" type="text/css" />
Just need to set it's width 100%

overflow: hidden; on transitioning element

As you can see here (fiddle), a is the parent and is set to overflow: hidden;. span is the child and has box-shadow set. When nothing happens, everything goes well, but when a user hovers the a, its overflow property seems to get overwritten (i.e. the shadow is shown in a square, rather than a circle, as it should). Any idea how to solve this?
Code:
HTML
<span>Hover me</span>
CSS
a {
overflow: hidden;
width: 52px;
height: 52px;
top: 0;
display: block;
position: relative;
margin: 50px;
background: red;
-webkit-transition: all 300ms linear;
-moz-transition: all 300ms linear;
-ms-transition: all 300ms linear;
-o-transition: all 300ms linear;
transition: all 300ms linear;
border-radius: 200px;
opacity: 0.6;
}
a:hover {
opacity: 1;
top: -8px;
}
a > span {
width: 100%;
height: 100%;
display: block;
box-shadow: inset 0 -35px 10px rgba(0,0,0,0.8);
}
a:hover > span {
box-shadow: inset 0 -28px 10px rgba(0,0,0,0.8);
}
your question is not understable but try this if it can help you then....
a {
overflow: hidden;
width: 52px;
height: 52px;
top: 0;
display: block;
position: relative;
margin: 50px;
background: red;
-webkit-transition: all 300ms linear;
-moz-transition: all 300ms linear;
-ms-transition: all 300ms linear;
-o-transition: all 300ms linear;
transition: all 300ms linear;
border-radius: 200px;
opacity: 0.6;
}
a:hover {
overflow: hidden;
opacity: 1;
}
a > span {
overflow: hidden;
width: 100%;
height: 100%;
display: block;
box-shadow: inset 0 -35px 10px rgba(0,0,0,0.8);
}
a:hover > span {
overflow: hidden;
box-shadow: inset 0 -28px 10px rgba(0,0,0,0.8);
}

CSS3 Gradient not working in Firefox

For some reason my CSS Gradient isn't working in Firefox (v10.0.1). The main background for the page is supposed to be a gradient from white at the top down to a blueish colour, but in Firefox instead of a smooth gradient I'm just getting two solid blocks of colour, one white, one blue. In Chrome and Safari (on iPad & iPhone) it works perfectly.
Here is the test url for the page:
http://testing.xenongroupadmin.com/bitesize/login.html
And here is my CSS code:
body { font-family: arial, tahoma, verdana, sans-serif;
background: linear-gradient(bottom, #FFFFFF 42%, #CDEDFA 6%);
background: -o-linear-gradient(bottom, #FFFFFF 42%, #CDEDFA 6%);
background: -moz-linear-gradient(bottom, #FFFFFF 42%, #CDEDFA 6%);
background: -webkit-linear-gradient(bottom, #FFFFFF 42%, #CDEDFA 6%);
background: -ms-linear-gradient(bottom, #FFFFFF 42%, #CDEDFA 6%);
background: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.42, #FFFFFF),
color-stop(0.06, #CDEDFA));
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
width: 100%;
min-width:1350px;
}
I've tried searching for an answer but can't seem to find an example which matches my current predicament.
Thanks everyone
try this... its cross browser even works in ie6
.bodyGradient {
position: absolute;
top: 0;
left: 0;
border-top: 3px solid #93ae59;
z-index: -1;
background: -moz-linear-gradient(top, #cfddac, #fff);
background: -webkit-gradient(linear, left top, left bottom, from(#cfddac), to(#fff));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfddac', endColorstr='#ffffff');
background: -o-linear-gradient(rgb(207,221,172),rgb(255,255,255));
}
use "background-image" instead of "background", like this example from http://gradients.glrzad.com/
background-image: -moz-linear-gradient(bottom, #DBA803 13%, #FFCA1D 57%, #FFF338 79%);
write this in your css
background-image: -moz-linear-gradient(top , #FFFFFF 62%, #CDEDFA 89%);
Better way to define gradient for all browsers
body {
background: linear-gradient(top , #FFFFFF 62%, #CDEDFA 89%);
background: -moz-linear-gradient(top , #FFFFFF 62%, #CDEDFA 89%);
background: -webkit-linear-gradient(top , #FFFFFF 62%, #CDEDFA 89%);
}

Resources