From the course: JavaScript: Client-Side Data Storage

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Delete items from IndexedDB

Delete items from IndexedDB - JavaScript Tutorial

From the course: JavaScript: Client-Side Data Storage

Start my 1-month free trial

Delete items from IndexedDB

- [Instructor] Now let's explore how we can delete items in index.db. The first thing I want to do, I want to make my list of items here a little bit nicer, so let's go ahead and add a few styles here. So the first thing I'm gonna do in styles.css, after line 13, I'm gonna create a brand new contacts style, and I'm gonna add simply background color to be a light blue. And then after the ul, what I'm gonna do is add a few things. First I'm gonna add a li, with a border bottom of one pixel, solid and white. And then li last child, which means basically the last element. Border none. And finally, I'm gonna add some space to the button otherwise it's gonna look too close, and when I say button, we'll create a button in this video for deleting our stuff. So margin I'm gonna do 10 zero, 10 and zero again. Awesome, so if we go back, we have new styles here, we're good to go, perfect. Let's go back to our app here and let's start working on the delete stuff. So the first thing we need to do…

Contents