Tuesday 24 June 2014

Apply CSS depending on Input Type and Element type.

CSS file...

.upload-modal input[type="text"], textarea {

border-color: #DDDDDD;
border-style: solid;
border-width: 1px;
display: block;
font-family: roboto;
font-size: 0.9em;
margin: 0.5em 0;
padding: 0.5em 0;
resize: none;
width: 100%;
border-radius: 0.5em 0.5em 0.5em 0.5em;
-moz-border-radius: 0.5em 0.5em 0.5em 0.5em;
-webkit-border-radius: 0.5em 0.5em 0.5em 0.5em;
}

HTML file...
<div class="modal-dialog upload-modal">// two class is apply
<section>
<div class="secChild">
<input name="post" id="post" value="post" type="text">
</div>
<div class="secChild">
<textarea name="description" id="description">description</textarea>
</div>
<div class="secChild">
<input name="tag" id="tag" type="text" value="tag">
</div>
</section>
<div >
Apply above css depending on the element type and input type of all element of upload-modal .

No comments:

Post a Comment