vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.72k forks source link

Sizing textarea width #361

Open ghost opened 11 years ago

ghost commented 11 years ago

Is there a way for us to size a specific textarea width in a inline or popover edit mode? Yet allowing the textarea to stretch if needed?

vitalets commented 10 years ago

yes, via css:

.mytextarea {
  width: 200px;
}

and then

editable({
    inputclass: 'mytextarea'
});
ghost commented 10 years ago

How to make textarea 100% of parent ? Settings that you posted wont shrink textarea. So it breaks bootstrap responsive grid, because textarea is fixed with 200px width

chall8908 commented 10 years ago

Just use relative sizes.

.mytextarea {
  width: 100%;
}
ghost commented 10 years ago

@chall8908 It doesen't work. Tried it already. X-editable is breaking default bootstrap sizing. Because if you will look in docs there is said:

Individual form controls automatically receive some global styling. All textual ,