I just started working at a web development firm Monday, and I was assigned a project to allow users to switch between a grid and list view.

Problem is, this is some awful legacy code. There are hundreds of nested tables, spacer gifs, inline styles, evals, almost no classes or ids on anything, it's organized terribly, no doctype, and tons of different files spread everywhere that mix tons of table markup with JSP logic (and I don't even know JSP).

I spent my first 3 days trying to make the whole tables thing work, and eventually decided it's not going to happen. I've managed to tame some of the tables, but I have to re-do the global nav as well, and that's filled with nested tables and all that crap too. I've run into wall after wall because of how poorly this (big) site is implemented.

I feel like this is a test for me to see if I can swing it, and I want to pass the test and get this done on time and budget. Anyone have any advice or tips for making awful markup work, or has anyone else had a similar experience in their career?