I used below code for showing ellipsis if text length is more in a placeholder. It's working good in Chrome and Firefox. Where as in IE it's not working.
input[placeholder] {
text-overflow:ellipsis;
}
I used below code for showing ellipsis if text length is more in a placeholder. It's working good in Chrome and Firefox. Where as in IE it's not working.
input[placeholder] {
text-overflow:ellipsis;
}
Code here:
work well for me.
From CSS-tricks: "text-overflow only occurs when the container's overflow property has the value hidden, scroll or auto and white-space: nowrap;.
Try adding this:
I was having the same problem and came across this blog post from Front End Tricks And Magic that worked for me. The gist of the blog is that you CAN do an ellipsis in an input in IE, however only if the input has a readonly attribute.
Obviously in many scenarios we don't want our input to have a readonly attribute. In which case you can use JavaScript to toggle it. This code is take directly from the blog, so if you find this answer helpful you might consider checking out the blog and leaving a comment of appreciation to the author.
HTML:
CSS:
JavaScript (using jQuery)