Note that there are some explanatory texts on larger screens.

plurals
  1. PO:hover with linear gradients in IE9
    primarykey
    data
    text
    <p>The design for this button calls for it to have a linear gradient, but then when you hover over it, the button should go to a flat color. The main class looks like this, and it seems to work find in all the browsers I've tested it in. As you can see, I'm also using PIE to make the gradient work properly in lower IE browsers.</p> <pre><code>.mvcView.button.texture { background-color: #F34914; border-width: 0px; color: #fff; cursor: pointer; font-size: 14px; font-weight: bold; padding: 4px; min-width: 40px; overflow:visible; /*overflow visible is required for ie 7 to respect min-width and doesn't seem to affect other browsers. */ width : auto; vertical-align: middle; font-family: Arial; background-color: #F34914; background: -webkit-linear-gradient(top, #F34914, #8A2800); background: -moz-linear-gradient(top, #F34914, #8A2800); background: -ms-linear-gradient(top, #F34914, #8A2800); background: -o-linear-gradient(top, #F34914, #8A2800); background: linear-gradient(top, #F34914, #8A2800); -pie-background: linear-gradient(#F34914, #8A2800); behavior: url('/PIE.htc'); } </code></pre> <p>For webkit browsers, the following css changes the color to be flat on mouseover:</p> <pre><code>.mvcView.button.texture:hover { background: #AA3200; } </code></pre> <p>For IE9, the hover only works if I do it this way:</p> <pre><code>.mvcView.button.texture:hover { background: #AA3200; background-color: #AA3200; -pie-background: linear-gradient(#AA3200, #AA3200); behavior: url('/PIE.htc'); } </code></pre> <p>Is there another, more elegant way to do this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload