I want to add some space to the right of an <input type="text" />
so that there's some empty space on the right of the field.
So, instead of , I'd get .
So, same behavior just some empty space to the right.
I've tried using padding-right
, but that doesn't seem to do anything.
Is there a way to do this (or fake it)?
You can provide padding to an input like this:
HTML:
CSS:
however I would also add:
Box sizing makes the input width stay at 250px rather than increase to 260px due to the padding.
For reference.
padding-right should work. Example linked.
http://jsfiddle.net/8Ged8/
padding-right works for me in Firefox/Chrome on Windows but not in IE. Welcome to the wonderful world of IE standards non-compliance.
See: http://jsfiddle.net/SfPju/466/
HTML
CSS
HTML
For Other Browsers:
For IE:
you can solve this, taking the
input
tag inside adiv
, then put the padding property ondiv
tag. This work's for me...Like this:
and css: