This error occurs because, when using a CSS framwork such as Twitter boostrap, such a framework specifies the width and height of elements such as text and textarea.
In this case, after applying your change with CSS, you should use an inspector such as Firebug or Devtools to see if the CSS selector has enough specificity.
The code posted so far gives no exact idea where the problem is, but adjusting the specificity of the selector and overriding the pattern of your CSS library will solve your problem.
Two simpler ways to increase specificity is, for the class that your textarea has or the textarea tag itself, to add after the width: 80%
one !important
or prefix the selector with an ID element.
textarea {
width: 80% !important; /* Idealmente !important deve ser evitado */
}
In the case of the other solution
#algumid textarea {
width: 80%;
}
Specificity of CSS
A quick help on this can be seen at http://www.maujor.com/tutorial/especificidade.php
CALCULATIONS:
1°. -) Count the number (quantity)
of id attributes in the selector;
2°. -) Count the number (quantity)
of class attributes in selector;
3°. -) Count the number (quantity)
HTML tag in selector;
4°. -) Write the numbers obtained,
from left to right
order in which they were raised (id,class,tag).
If there is a tie in the score it is worth the cascade effect the last rule declared prevails.
There are other details besides about selector specificity for tiebreaker criteria
Post your code if possible on jsfiddle.net
– Silvio Andorinha
Look, it does work. There must be some other mistake you’re making. Edited: I saw it here. It’s working. The only thing missing is to use media queries to define the breaking points, if you really want different points. What you understand as Responsive?
– Emerson Rocha
already edited the post
– pc_oc
is Responsive due to jsfiddle.net, but if you try to apply in a blank window it is not.
– pc_oc
Ah, your problem is that you might be using a CSS framework, like Twitter boostrap, but you’re not correctly overwriting CSS. Simple answer. Confirm that you are using a framework.
– Emerson Rocha
yes, I’m using a framework
– pc_oc
Change the question and put the framework you are using. If possible, link your jsfiddle to a standard CSS of the framework you are using. This way we’ll see exactly what problem is past. Your solution is probably just to improve the specificity of the CSS selector
– Emerson Rocha
Responsive is the size of the textarea to edit depending on the window size.
– pc_oc
Responsive typically refers to layouts that "work" on various screen sizes (as opposed to needing horizontal scrolling, getting huge margins or having different pages for mobile phones).
– luiscubal