I want to move my placeholder in upper-left corner.
I want something like on the image.
I've tried
::-webkit-input-placeholder {
left: 0px;
up: 0px;
}
But it doesn't work. I know HTML well, but I never did something like this.
I want to move my placeholder in upper-left corner.
I want something like on the image.
I've tried
::-webkit-input-placeholder {
left: 0px;
up: 0px;
}
But it doesn't work. I know HTML well, but I never did something like this.
I've found answer by myself! :D
So, I just changed <input>
to <textarea>
. With a little CSS it looks completely same as input field.
Very much thanks for everyone who tried to help me!
You can only use text-align: center|left|right
to change the align of the input's value/placeholder.
source: https://developer.mozilla.org/de/docs/Web/CSS/text-align
Otherwise you could use padding: 0 0 0 0;
to force space
source: https://developer.mozilla.org/de/docs/Web/CSS/padding
Information: up isn't valid css. the right name is top
And if you want to use position attributes like: right, left, bottom
or top
you have to set position: absolute|fixed;
Edit: As told in here: https://stackoverflow.com/a/5677243/3119231 it is possible to set "top"
value through line-height
attribute
I think css positioning can help. position relative or absolute. According to your container, try to give one of position styles.
EDIT: or you can use background-image instead of placeholder. and you can remove background image on mouse over with javascript.
Unfortunately, you are limited to what styling can be applied to the placeholder
pseudo-element.
These are:
Position is not one of them.