AmitDiwan has Published 10740 Articles

How to create a Modal Box with CSS and JavaScript?

AmitDiwan

AmitDiwan

Updated on 07-May-2020 10:51:21

688 Views

To create a modal box with CSS and JavaScript, the code is as follows −Example Live Demo    body {       font-family: Arial, Helvetica, sans-serif;    }    .modal {       text-align: center;       display: none;       position: fixed; ... Read More

How to create a full screen video background with CSS?

AmitDiwan

AmitDiwan

Updated on 07-May-2020 10:48:31

606 Views

To create a full screen video background with CSS, the code is as follows −Example Live Demo    * {       box-sizing: border-box;    }    body {       margin: 0;       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;     ... Read More

How to create a comparison table with CSS?

AmitDiwan

AmitDiwan

Updated on 07-May-2020 10:44:56

494 Views

To create a responsive table with CSS, the code is as follows −Example Live Demo    table {       border-collapse: collapse;       border-spacing: 0;       width: 100%;       border: 1px solid #ddd;    }    th, td {   ... Read More

How to create a responsive table with CSS?

AmitDiwan

AmitDiwan

Updated on 07-May-2020 10:42:19

1K+ Views

To create a responsive table with CSS, the code is as follows −Example Live Demo    body{       font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;    }    div{       overflow-x: auto;    }    table {       border-collapse: collapse;   ... Read More

How to sort an HTML list using JavaScript?

AmitDiwan

AmitDiwan

Updated on 06-May-2020 14:29:47

1K+ Views

To sort an HTML list using JavaScript, the code is as follows −Example Live Demo Sorting list example Click to sort Giraffe Camel Dog Lion Cheetah Cat    document .getElementsByTagName("button")[0] .addEventListener("click", sortList);    function sortList() {       var list, i, sortFlag, LiEle, sorted;   ... Read More

How to create a filter table with JavaScript?

AmitDiwan

AmitDiwan

Updated on 06-May-2020 14:19:22

1K+ Views

To create a filter table with JavaScript, the code is as follows −Example Live Demo    * {       box-sizing: border-box;    }    .searchField {       width: 100%;       font-size: 16px;       padding: 12px 20px 12px 40px;   ... Read More

How to create a filter list with JavaScript?

AmitDiwan

AmitDiwan

Updated on 06-May-2020 14:15:59

558 Views

To create a filter list with JavaScript, the code is as follows −Example Live Demo    * {       box-sizing: border-box;    }    .searchInput {       width: 100%;       font-size: 16px;       padding: 12px 20px 12px 40px;   ... Read More

How to add form validation for empty input fields with JavaScript?

AmitDiwan

AmitDiwan

Updated on 06-May-2020 14:11:54

2K+ Views

To add form validation for empty input fields with JavaScript, the code is as follows −Example Live Demo JavaScript empty input field validation example Name: Submit the form empty to see the validation performed    function emptyValidation() {       var formField = ... Read More

How to turn off spell checking (grammar correction) for HTML form elements?

AmitDiwan

AmitDiwan

Updated on 06-May-2020 14:07:54

186 Views

To turn off spell check for form elements, the code is as follows −Example Live Demo Disabling Spellcheck Example Your Name: About Yourself Type wrong spelling in the above input field to see spellcheck in action OutputThe above code will produce the following ... Read More

How to disable autocomplete of an HTML input field?

AmitDiwan

AmitDiwan

Updated on 06-May-2020 14:05:06

380 Views

To disable autocomplete of an input field, the code is as follows −Example Live Demo    input{       font-size: 18px;       padding: 10px;       margin: 10px;       border:1px solid grey;    } Autocomplete on/off Example First ... Read More

Advertisements