Things we do in the beginning that make us shake our heads now

Sometimes its hard to write blog posts, because nothing inspiring pops into my head. Didn’t get to actually learn anything tonight, which sucks, but I will be on a mission tomorrow to do just that. Anyway, a thought came into my head as I was staring mindlessly at my keyboard. “Wow…remember when I tried to do THAT the first time? God I was an idiot!”

We’ve all had those moments. One of mine was getting things positioned using ‘relative’ positioning. I won’t go into the details, of how dumb I was, but lets just say I had my top margins at -500px or something silly like that. Now I know that you have to position relative the parent div and absolute the one you need to place with pin point accuracy using top and left. All browsers then get along.

Another…the float. I used to float the HELL out of divs, when it was totally unnecessary. I mean EVERYTHING. Stupid, stupid, stupid. Yes I could get things to work, but man what a pain in the ass.

Or how about dealing with IE6′s double margin? I used to write a separate rule for each margin that had a a left or right on it for IE6, when really a display: inline will work just fine.

You know when everything got real easy though? Using a css reset. I remember doing a site that had a bunch of ul’s on it, and they were all different. My css was disgusting. Everyone of them had seperate padding and margin rules and all sorts of crazy was going on. If I had just reset them all to 0, and then adjusted what I needed…wow.

So what are some things you have done that makes you shake your head and want to slap yourself? I know there are a ton more that I’ve done. But really, that is the point of this blog. To help the new and middle level web developer skip through all the crap I’ve gown through. I wish I had the resources available to me back in the day, as everyone does now.

Oh, and if anyone has a freakin’ link/site that shows how to start from ground zero to getting a web page up and going using Ruby, PLEASE give it to me! I talking about a for dummies type approach.

jQuery junkBox

.prependTo(target);
This method will return matching elements and add them to the beginning to the target. So, below would add an h1 tag to the beginning of the tag with an id of ‘container’

$('h1').prependTo('#container');

Tags:

3 Responses to “Things we do in the beginning that make us shake our heads now”

  1. I would say my divItis. And not knowing that an element is converted to display: block the moment it’s floated.

  2. jcDesigns says:

    About a year ago, I created a template for my work, which got put on hold, and now I’m going back and finishing it up. I opened the files, looked at my html and after 5 minutes of staring went “What the F*&$ was I doing here?” I completely redid it, because I couldn’t figure out my own code. One problem I experience though is, while in the middle of doing a site, I get interrupted a bunch of times, forget what my plan was, and then end up with some serious crazy. Divititis is one of the hardest things to get over. Once you do though, everything becomes easier.

  3. Yeah, I know what you mean. If you have a tablet and photoshop, it’s not a bad idea to draw out your div scheme.

    However, my boss uses vb.NET controls and those things pop out the UGLIEST html ever with garbage div IDs. That’s really annoying to deal with.

Leave a Reply to Joseph McCullough