Showing posts with label CSS and HTML. Show all posts
Showing posts with label CSS and HTML. Show all posts

Tuesday, 19 August 2014

trancate string in CSS if it goes out of the parent content?

.myClass 
{
    overflow: hidden;         // hide the string if it is overflow.
    text-overflow: ellipsis;  //put three dot after trancate string.
}

Thursday, 26 June 2014

How to apply CSS on Hidden Button in HTML

CSS file:--
#btnPost[disabled="disabled"] {
    background: none;
}

html file:-
<button type='submit' class='leftArrow' id='btnPost' disabled='disabled'>Post</button>

This css file is used to remove the backgraound of the button.

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 .