diff --git a/script/script.js b/script/script.js index e66e2b2..2624596 100644 --- a/script/script.js +++ b/script/script.js @@ -101,6 +101,7 @@ let budgetController = (function() { //Getting index of item to be deleted indexOfItem = arrayOfIDs.indexOf(id); + //Deleting the item using splice method if item exists if(indexOfItem !== -1){ data.allItems[type].splice(indexOfItem, 1); @@ -423,7 +424,7 @@ let controller = (function(budgetController, UIController) { budgetController.deleteItem(type, ID); //Delete the item from the UI - deleteItemFromUI(itemID); + UIController.deleteItemFromUI(itemID); //Update and show the new totals updateBudget(); diff --git a/style/style.css b/style/style.css index 5de6c3a..fc01080 100644 --- a/style/style.css +++ b/style/style.css @@ -46,6 +46,8 @@ body { } .budget { + background: rgba(0,0,0,0.3); + padding: 1rem; position: absolute; width: 350px; top: 50%;