Skip to content

Instantly share code, notes, and snippets.

View enggsuraj's full-sized avatar
💻
Focusing

suraj gehlot enggsuraj

💻
Focusing
View GitHub Profile
@enggsuraj
enggsuraj / main.html
Created December 30, 2021 06:18
Stickty Footer at bottom without overlapping content
<!DOCTYPE html>
<html>
<head>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
export function truncate(str) {
const length = 100;
const ending = "...";
if (str.length > length) {
return str.substring(0, length - ending.length) + ending;
} else {
return str;
}
}
/* WIDTH: 1200 to 2000px */
@media only screen and (max-width: 2000px) {
}
/* WIDTH: 1024 to 1200px */
@media only screen and (max-width: 1200px) {
}
/* WIDTH: 768 to 1024px */
@media only screen and (max-width: 1024px) {
@enggsuraj
enggsuraj / localstorage.js
Last active February 16, 2023 19:16
Local Storage in Javascript
// USER OBJECT
const user = {
name: "blogtheorem",
ID: 123,
isCoding: true,
};
// CRUD OPERATION
//1. CREATE
@enggsuraj
enggsuraj / cssreset.css
Last active February 16, 2023 19:17
CSS Starting Boilerplate Reset
* {
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
list-style: none;
}
.clearfix::after {