From aeb8e5bbfb88e0162270a2ce372cc5fae26afb4e Mon Sep 17 00:00:00 2001 From: Shyam1806 <62296718+Shyam1806@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:58:40 +0530 Subject: [PATCH] "some modifications and file have been changed" --- css/style1.css | 11 +++++++-- index.html | 60 ++++---------------------------------------------- js/index.js | 45 +++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 js/index.js diff --git a/css/style1.css b/css/style1.css index 218c0b2..0035eae 100644 --- a/css/style1.css +++ b/css/style1.css @@ -240,8 +240,12 @@ text-align: center; top:59px; left:19px; } +.firstpart{ + display: flex; + justify-content: center; +} .firstpart>input{ - margin: 0 auto; + /* margin: 10px auto; */ background-color: #96ced1; border: 1px solid #ce96d1; padding: 10px 139px; @@ -250,12 +254,15 @@ text-align: center; } .today{ background-color: #bf28da; - margin: 0 auto; + margin: 10px auto; width:50%; padding:10px 0px; box-shadow : 5px 5px 15px -5px rgba(0, 0, 0, 0.3); margin-top:40px; } +.firstpart>button{ + font-size: 20px; +} .today>h1{ text-align: center; color:#fff; diff --git a/index.html b/index.html index 2678c14..6a7bd1d 100644 --- a/index.html +++ b/index.html @@ -20,8 +20,8 @@

Today

@@ -49,65 +49,13 @@

Today

+ - \ No newline at end of file diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..f76d7e7 --- /dev/null +++ b/js/index.js @@ -0,0 +1,45 @@ + +function first(){ + let a = document.getElementById("ip1").value; + + document.getElementById("ip1").value=""; + + var para = ""; + + var t =[]; + var d = a; + t.push(d); +// console.log(t); + var node = document.createElement("p"); + var btn = document.createElement("button"); + btn.setAttribute("id" , "remzbtn"); + btn.addEventListener("click" , trash); + var insbtn = document.createElement("i"); + insbtn.setAttribute("class" , "fa fa-trash onez"); +// console.log(insbtn); + btn.appendChild(insbtn); + var c = document.createTextNode(t); + + node.appendChild(btn); +node.appendChild(c) ; +// dynamic css styles. +node.style.backgroundColor="#fff"; +node.style.padding = "20px"; +node.style.fontSize = "20px"; +node.style.margin="10px 10px"; +node.style.borderBottom="1px solid"; +node.style.borderBottomColor="#f1f1f1"; +node.style.overflow="hidden"; +insbtn.style.fontSize="19px"; +btn.style.marginRight="24px "; +btn.style.overflow="hidden"; + + +document.getElementById("one").append(node); + +function trash(){ + var rtm = document.getElementsByName(c); +// console.log(rtm); + node.remove(rtm); //it will remove the which btn clicked. +} +} \ No newline at end of file