Ancho de entrada para ser 100% - 20px

I know this isn't possible but I am wondering if there is any other way of achieving the effect.

If you look at the jsfiddle below you will see that the input is 94% of the container and centered, this works OK but what I really want is for the input to have a 10px margin on each side.

http://jsfiddle.net/brendan_rice/4ugxk/13/

¿Alguien puede ayudar por favor?

preguntado el 28 de agosto de 12 a las 13:08

4 Respuestas

Respondido 28 ago 12, 13:08

tal vez intente algo como eso http://jsfiddle.net/4ugxk/24/ if it's ok

.bottom{
  position: absolute;
  bottom: 0;
  left:0; right:0;
  margin-left:10px;
  margin-right:10px;
}

Respondido 28 ago 12, 13:08

Elimine anchura a partir de su .bottom DIV. Escribe así:

.bottom{
    position: absolute;
    bottom: 0px;
    background-color: red;
    left: 10px;
    right:10px;
    text-align: center;
}

Mira esto: Violín

Respondido el 26 de enero de 14 a las 11:01

You could put a wrapping span (or div) around the input element and use that to apply the margin you want. You'd need to remove the default styling from the standard input box (padding, border etc.) and style this wrapping element as you want the input to appear.

Ver: http://jsfiddle.net/4ugxk/43/

Respondido 28 ago 12, 13:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.