Wednesday, December 11, 2013

Remove extra spacing in between NumericUpDownExtender default buttons (ASP.NET Ajax)

When integrating NumericUpDown Extender to your asp.net apps, there's a wide gap in between the up/down buttons as shown below:
The trick was to replace the doctype declaration in master page from:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
to:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
Note: This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font) as described in w3. So, I believe there are presentational elements or deprecated elements incorporated into this extender.
Reference: StackOverflow

Cheers!

7 comments: