The Ajax control toolkit tab panel automatically inserts a space by all four corners of the body. For example, go to http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Tabs/Tabs.aspx and look at the TabPanel on the page. The is a space before “Signature:” and “Bio:” labels. How can I set the space-width to 0px; in the tabPanel body?
The Ajax control toolkit tab panel automatically inserts a space by all four corners
Share
I was having a very similar problem with the whitespace between the tab headers. The tab headers are
<span>tags, so most browsers render the whitespace as a text node in the DOM. To remove the ignorable whitespace nodes, call a JavaScript function when the page loads, like this:The script finds the
<div>that holds the tab headers and loops through those header<span>elements. It removes all nodes that contain only ignorable whitespace (which it determines with the second function).Note: The IE8 DOM unfortunately doesn’t include text nodes (it’s a known bug).