From ed19c023a12fcf0f3935f624ed1599f3b81fa2b7 Mon Sep 17 00:00:00 2001 From: abhaychoudhary0211 Date: Thu, 27 Mar 2025 10:50:18 +0530 Subject: [PATCH] Changes in Projects Their is a bug in projects section is that need minimum 2 projects needed or the number of projects are even. The bug is removed and we can now create the page with zero projects and with odd number of projects --- css/main.css | 33 ++++++++++++++++++++++++--------- js/main.js | 29 ++++++++++++++--------------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/css/main.css b/css/main.css index fa3bf38..cebcebb 100644 --- a/css/main.css +++ b/css/main.css @@ -12,7 +12,27 @@ a{ font-size:3em; } #table{ + margin-left: auto; + margin-right: auto; border-spacing: 15px; + width: auto; + display: table; +} + +#table tr { + display: table-row; + text-align: center; +} + +#table td { + text-align: center; + display: table-cell; + vertical-align: middle; +} + +#table tr:last-child td:only-child { + display: block; + margin: 0 auto; } #bg { @@ -45,10 +65,6 @@ a{ *[data-href] { cursor: pointer; } -#table{ - margin-left: auto; - margin-right: auto; -} #rcorners1 { transition: transform .2s; border-radius: 25px; @@ -64,12 +80,11 @@ a{ border-radius: 25px; background: #f3f2ed; text-align: center; - /* padding: 20px; */ width: 15rem; - height:2rem; - margin-left: auto; - margin-right: auto; - } + height: 2rem; + margin: 0 auto; + display: inline-block; +} #rcorners1:hover { transform: scale(1.1); } diff --git a/js/main.js b/js/main.js index 7665128..7398f2e 100644 --- a/js/main.js +++ b/js/main.js @@ -87,24 +87,23 @@ function procj(data){ return html; } - if(Object.keys(data).length%2==0){ - var tabledata = ""; - for(var i=0;i