1

i try to style an form control over CSS (example http://jsfiddle.net/fyVs4/).

But the CSS selector .form-control:before won't work- Curiouse, i had make a other button with CSS ober button:before and that's work:

Won't work

.form-control:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: block;
    width: 7px;
    height: 42px;
    background: #00122A url('../images/button/left.png');
    border-radius: 10px 0 0 10px;
}

WORK

nav ul li button:before {
    content: "";
    position: absolute;
    top: 0;
    left: -5px;
    bottom: 0;
    display: block;
    width: 5px;
    height: 37px;
    background: #00122A url('../images/button/left.png');
    border-radius: 10px 0 0 10px;
}

What i'm doing wrong?

Adrian Preuss
  • 3,228
  • 1
  • 23
  • 43
  • 3
    Looks like input fields cannot have pseudo elements, see http://stackoverflow.com/questions/2587669/css-after-pseudo-element-on-input-field for a more detailed answer. – PhistucK May 04 '14 at 21:44
  • Aww, really? Thats bad. Okay, otherwise i must use an container. Big Thanks! – Adrian Preuss May 04 '14 at 21:47

0 Answers0