Ok so I've been through answers like "background-clip: padding-box;" and while it makes the end product look a little better, it still doesn't completely solve the problem of the background color bleeding outside of the border. Does anyone have a real solution to this issue?
Here's a screenshot of the issue:
CSS Used For Buttons
#footer #pager li a {
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
display: block;
float: left;
color: #444 !important;
text-decoration: none !important;
background-clip: padding-box !important;
padding: 8px 12px;
background-color: #ccc;
border: 1px solid #000;
}
It's not what you're waiting for, I know, but I have to say this: use an image. This is not only due to the possibility to eliminate the bleed on all browsers. Your bleed problem on Firefox is nothing compared to how Chrome mercilessly slaughters the look of your buttons... Check it and start crying :(.
In case you're wondering what's wrong: Chrome is utterly helpless when you use border-radius and box-shadow:inset on the same element. It's a known bug and you can't eliminate it until they fix it in the browser (and judging by how "fast" they are to respond to some bug reports - some have been reported two years ago and still are unsolved, even when the users offer a ready solution - I think we shouldn't expect Chrome to work properly in the near future).
[EDIT]
Also, note this:
Firefox produces the bleed effect
Opera doesn't render CSS3 gradients
IE doesn't render box shadow
Chrome fails in the worst manner possible
So... there isn't a single browser which renders your button correctly. Does it make sense to keep using CSS3 in this case?
The solution would be to use an image instead of the background for the link, with overflow: hidden:
.button{
margin: 45px 0;
width: 222px;
height: 40px;
display: block;
border: 1px solid #ebebeb;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
overflow: hidden !important;
}
.button img {
width: 222px;
height: 40px;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff799), to(#fdc689));
background: -webkit-linear-gradient(top, #fff799, #fdc689);
background: -moz-linear-gradient(top, #fff799, #fdc689);
background: -o-linear-gradient(top, #fff799, #fdc689);
background: -ms-linear-gradient(top, #fff799, #fdc689);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#fff799', EndColorStr='#fdc689');
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fff799', EndColorStr='#fdc689', GradientType=0)";
}
Related
I am not sure why react-slick adds bellow inline properties while forming the slider.
width: 100%; display: inline-block;
Because of this my applications own CSS doesn't work and behaves differently. Please help me understanding and resolve this.
Please follow the mentioned link, where I tried to mimic the issue related to react-slick
https://stackblitz.com/edit/react-b8wcgf
You need in CSS add after the element value !important.
For example:
.product-wrap {
position: relative;
width: 30px !important;
display: grid !important;
border: 1px solid red;
}
Instead of 30px and grid type your values but keep !important.
I'm finding MathJax a superior alternative to MathML. However, I'm having some trouble getting MathJax to render while using a :hover event in my CSS:
span.rollover span {
display: none;
position: absolute;
background-color: white;
padding-left: 7px;
padding-right: 7px;
border: 1px solid red;
color: navy;
font: 1em "Computer Modern", "Computer Modern Roman", "Latin Modern", "Cambria Math", serif;
text-decoration: none;
border-radius: 10px 10px 10px 0;
opacity: 0.9;
text-align: center;
vertical-align: middle;
white-space: nowrap;
line-height: 150%;
}
span.rollover:hover span {
display: initial;
top: -30px;
z-index: 50;
}
At the moment it's displaying garbage; a current draft of the page can be found here. Here's an example of the problem:
<span class="rollover">Initial angle<span>0.0 ≤ $\theta_0$ ≤ 1.6 rad</span></span>
Is there a way to force MathJax to render the markup for such an event?
Your CSS is too aggressive: it applies to every span within your rollover spans. Since MathJax uses spans to lay out the mathematics, it applies to those, and so you are forcing the position, border, top, etc. for every element used by MathJax. That means you are moving the math content out of place, and giving it borders, and so on (this account for some of the extra elements that appear above the ones you expect.
If you change
span.rollover span {
...
}
span.rollover:hover span {
...
}
to
span.rollover > span {
...
}
span.rollover:hover > span {
...
}
so that these styles only apply to the top-level child spans (rather than every span), that should do it for you.
My product image gallery uses a fancy box script and since i installed a plugin, i am having a small problem with the images popping up, then immediately jumping to the upper left corner.
i have tried adding stying to recenter it but its not working.
here is a product page:
http://a1decals.com/products-page/tribal-symbols-decals/flags-decals/america-american-flag-decal-sticker/
if you click on an image in the gallery you can see it popup.
i inspect the image element with firebug and get:
<div id="fancybox-wrap" style="width: 695px; height: auto; top: 0px; left: 0px; display: block; opacity: 1; transition: all 0s ease; -webkit-transition: all 0s ease;">
and i tried adding:
.fancybox-wrap {
top: 50% !important;
left: 50% !important;
}
and
#fancybox-wrap {
position: absolute;
top: 50% !important;
left: 50% !important;
}
i cant seem to override whatever is restyling that popup. any help is greatly appreciated
I'm trying to center my content div. It's set to 100%, and the div is contained in body, which is also set to 100%. I have a max-width: 1400px because I don't want my content to stretch more than that if the screen resolution is higher. The thing is, it doesn't work using margin: auto. My content stands on the left, uncentered on screen wider than 1400px.
If I delete the max-width, everything is perfectly centered on wide screens, but the content is stretched to the the whole screen...
#content {
width: 100%;
height: auto;
position: absolute;
top: 400px;
margin: 0 auto;
margin-top: 50px;
display: none;
max-width: 1400px;
}
Easiest way to achieve this, is to set the width property to the max width you need, and add max-width: 100%;. This will prevent it from being bigger than 100% but still go up to the max width. Also, you should remove the absolute positioning:
JS Fiddle
You can use the transform technique, which doesn't require extra mark-up or media queries.
#content {
position: relative; /* 'fixed' will work also. */
max-width: 500px; /* Your required width here. */
width: 100%;
left: 50%;
transform: translateX(-50%);
}
Here's a demo https://jsfiddle.net/matharden/6uduf7av/
Use Flexbox...
Put this classes in the parent element (the body):
The HTML
<body class="p-flexbox flex-hcc">
<!-- The content -->
</body>
Where:
p-flexbox means parent-flexbox
flex-hcc means flexbox-horizontal-center-center
The CSS
.p-flexbox {
display: -webkit-box;
display: -moz-box;
display: box;
}
.flex-hcc {
-webkit-box-orient: horizontal;
-webkit-box-pack: center;
-webkit-box-align: center;
-moz-box-orient: horizontal;
-moz-box-pack: center;
-moz-box-align: center;
box-orient: horizontal;
box-pack: center;
box-align: center;
}
Cheers,
Leonardo
What code do I add/ replace/ remove to change the size ofmarketbot.net
Are you talking about the global navigation menu or the slider that is on the page? The slider looks like it has a margin problem (in both I.E. 8 and Google Chrome).
I adjusted the css class named content-top to the following, so it isn't overflowing into the header:
.content-top
{
position:relative;
margin-top: 80px;
margin-bottom: 5px;
}
After I made the adjustments, it looks somewhat cleaner in the slider and header divs.
#header {
background: #FFFFFF
width: 100%;
padding: 30px 0px;
position:relative;
margin-top: 80px;
margin-bottom: 5px;
}
i didn't completely understand your question but i have tried to answer it.
you would need to edit
#header {
background: #FFFFFF
width: 100%;
padding: 20px 0px;
}