Ajax .Net TabControl In IE: 1 Pixel Gap Between Tab Header and Body

Ok, so this was weird and took a while to track down. After setting some styles for a TabControl, a 1 pixel gap appeared between the tabs in the header of the control and the tab body:



Firefox had no issue as usual. After the traditional flurry of setting margins and padding to 0 on every block level element in existence, I was beginning to tear my hair out. Fortunately I had another site that had a similarly styled TabControl that didn't have this issue and by process of elimination I found the offending tag.

To my surprise it all came down to the particular font I had chosen! I changed the font-family style for my body tag from 'Verdana' to 'Arial' and everything was fine! After a bit more investigation I found that it only happened when using 'Verdana' for certain units of the font-size style - If I was using 'pt' units the issue appeared but it was fixed by changing to 'px' units. This way I could continue using Verdana. Has anyone else seen something like this before?

Jimmy

Related posts

Comments

Add comment


 

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

March 9. 2010 13:56

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010