text area is getting inline styles automatically

孤街浪徒 提交于 2019-12-11 11:55:07

问题


i want to give a textarea in my form a custom width but the textarea is getting inline styels automatically which are overrriding my custom css styles?? i reviewed my scripts but i don't know which one is manipulating the dom??? please tell me if you know.

this is my markup's head

<head>
<title>Demo Website</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,800' rel='stylesheet' type='text/css'>
<link href="//fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Paytone+One' rel='stylesheet' type='text/css'>
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.0/animate.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/jquery-ui.min.css">
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

and these are the only scripts which are at the bottom in my body

<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/app.js"></script>

and by the way this is the first page i created and is the only one so i don't have any orther pages that have a textarea field.my text editor is brackets just so you know..

here's how it's rendered in dev-tools

<textarea data-brackets-id="173" name="textarea" id="textarea" placeholder="MESSAGE" style="margin: 0px;width: 183px;height: 54px;"></textarea>

回答1:


Although the CSS-code is not included, I'm guessing you declare something there about the <textarea> tag. You might want to look for !important declared behind css-code.




回答2:


Does it do it on mobile as well as desktop? Check the width of the form element and make the margin width 183px.



来源:https://stackoverflow.com/questions/34471514/text-area-is-getting-inline-styles-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!