Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

How to horizontally center a div in another div ?

<div id="outer"> <div id="inner">Foo foo</div> </div>

Solution:

#inner { width: 50%; margin: 0 auto; }

How to upload multiple files at once

<input type="file" multiple accept='image/*,audio/*,video/*' >

HTML: How to limit file upload to be only specific content type like images or videos ?

<input type="file" multiple accept='image/*,audio/*,video/*' >

How to include a JSP or HTML page in another JSP page

<%@ include file="relativeFragment.jsp" %>
 
eg:
<body onload="onLoad();" style="padding-bottom: 0px;">
 <form name="addRoleForm" method="post" action="../Admin/AddRole">
  <%@ include file="/pages/roleslist.jsp" %>     
 </form>
</body>  

Appending html to div tag using jstl and jquery function

http://stackoverflow.com/questions/6315210/problem-with-appending-html-and-jstl-code-in-a-div-object-using-jquery

Table Width

Few points to note:

Always mention the table width as percentage. like 100%
And then we can divide that 100% equally with the Td width

like
We can define the a single td, if we want using colspan.
This way it is easy to manage the widths.

Fade Out : Label fades out

Using JQuery:
$("#elementId").fadeOut(time, ActionFunction);

$("#errorMessage3").fadeOut(10000, null);

use this one, to fadeout any lable or element.

Using Java Script:



Autocomplete

Autocomplete=off is used to set for the input fields inhtml. But this shows a warning like attribute not defined. this is not defined by w3c standards. So it throws the warning. This is introduced by MS.

Use it like document.getElementById("elementId").setAttribute("autocomplete", "off");

this will not throw any warning.