While you're touching lines like this it might be a good idea to clean them up. Two if statements and a ton of html/css on one line is pretty scary. Don't need to go crazy and remove inline styles but at least make it some reasonable length lines.