New movie rental service

I’ve been doing some HTML/CSS/JS work for various clients at work recently and I’ve come across some very useful articles/tips for doing stuff. I’m sure none of this is new but if I only encountered it recently, maybe others haven’t yet.

Selfclearing Elements - Don’t you hate it when you float an element and the container doesn’t get the height correctly. Then, maybe you float the container, but that causes problems with other things. Then you try adding an element just to hang a clear on to fix it and now you’re cluttering up your pristine markup with garbage… There is a solution and it’s even elegant.

z-index/stacking - So, if you want something to appear above something else on a page, you just give it a higher z-index, right? That’s what I’ve always thought but I was never really satisfied with that because it didn’t always work the way I expected it to. I didn’t totally understand it so, when I had to fix something with z-indexes, I tended to just try different values in different places until I found something that works. No more. I found Overlapping and Z index and now it all makes sense.

JavaScript the JSON way - It’s pretty amazing how far the JavaScript language has come in the last few years. One of the coolest things I’ve seen recently is the technique for organizing your code with JSON to prevent function name collision and make things generally cleaner. Dustin Diaz has a great introduction to the method that will get you rolling with the JSON goodness.

2 Responses to “CSS/JS Grabbag”

  1. Amber says:

    Does it make me a bad wife if I don’t read these last two blog posts in detail?

  2. matt says:

    No, not at all. I’ve been wanting to write more technical posts like this because I generally get such valuable info from other people’s posts and I wanted to give back a bit. I recognize that my usual readership won’t get much from them but maybe there are lurkers or those who will find the pages through a search.