Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
textareaの幅がcols=で指定されているhtmlフォームがあります。textareaに文字数の観点から特定の幅を持たせたい。
ただし、一部のコントロールをテキストエリアの右端に右揃えにする必要もあります。それらはテキストエリアではなく、その真上または真下にあります。これを行うことは可能ですか?
考えられるアプローチは、テキストエリアの幅まで拡大できる何らかのタイプのコンテナでテキストエリアを囲むことかもしれないと考えていましたが、その中のテキストを右寄せする方法がわかりません。
このように:
.Container { position: relative; float:left; } .Inner { position: absolute; right: 0; } <div class="Container"> <textarea cols="50"></textarea> <div class="Inner">Right edge!</div> </div>