width auto不适用于textarea

时间:2015-08-26 13:59:50

标签: html css textarea

import scala.reflect.runtime.universe._ def func[A: TypeTag](a: A): Unit = println(typeOf[A]) scala> func("asd") String 没有在textarea上工作,为什么?

我想要的屏幕:here

DEMO:JSFiddle

1 个答案:

答案 0 :(得分:1)

您似乎通过JS应用了宽度,但为了让您的代码能够正常工作,您可以添加:

.newSujetText {
    margin-left: 115px; /* width of .userpost plus 10px padding */
    margin-right: 10px; /* add a bit of space from containers edge */
}
.newSujet {
    min-width: 100%; /* make textarea 100% of container */
    max-width: 100%; /* stop user from being able to make textarea bigger than container */
}

请参阅:https://jsfiddle.net/oyqLjjL1/

萨姆。