Thursday, June 17, 2004 12:35 PM
by
brian
Annoying Table CSS Style attributes in Visual Studio IDE
I get really annoyed by Visual Studios insistence on putting CSS style attributes for width and height in every TABLE and TD tag I resize, mainly because there is no easy way of getting rid of them beyond “trying” to select individual tags in the IDE or using the slow outline window. I can’t count the number of times I’ve had weird spacing issues that I had to track down and delete these attributes to fix.
I just wanted them all to go away, permanently. In my work I use spacer images to maintain table sizes. I know… but most of our designs call for pixel perfect HTML rendering on PC’s and Macs. Pure CSS doesn’t always do that for me. I haven’t spent much time with the 2005 IDE, but I hope it has better support for tables. Until then I wrote a quick little app to get ride of all the style attributes in a HTML document. It's simple. Just paste the code you want to strip, and click the Remove Style Attributes button. I'm thinking about expanding it to do more tidying, and changing the code to use regular expressions for the replacement.
Download Style Cleaner