У меня есть тема Wordpress со стандартным вводом CSS.Переопределить свойства CSS по умолчанию
input, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
border: none !important;
background-color: #f0efed;
line-height: 40px;
font-size: 16px;
color: #555;
border-radius: 0px;
-moz-border-radius: 0px;
-webkit-border-radius: :0px;
box-shadow: none !important;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
height: 40px;
}
Я хочу переопределить стили ввода, такие как 'text' и 'submit' только в определенном div.
Пример HTML:
<div class="checkout_page_container">
<table class="checkout_cart">
<tr>
<td><input type="text" /></td>
</tr>
</table>
</div>
Я пытаюсь это CSS. Но они не будут работать.
.checkout_page_container .checkout_cart input[type="text"] {
border: 1px solid #666;
}
.checkout_page_container .checkout_cart input[type="submit"] {
border: 1px solid #ccc;
color:#000;
}
Когда я делаю это. браузеры все еще обнаруживают стили ввода по умолчанию для темы.
Я слышал, что использование важного рода опасно? –
@JeremiLiwanag Не то, чтобы я знал. Я использую только важное значение, когда это абсолютно необходимо. – sheng