By popular demand, some Telerik web controls such as RadInput behave like inline-block elements, i.e. they do not force new lines on the page and at the same time, they obey width, height and other block-level-specific CSS properties.

In addition, RadInput supports a scenario in which several HTML elements (Label, TextBox and a Button) occupy a preset amount of space, without calculating and changing these elements' widths with Javascript on the client.

Unfortunately, all these requirements cannot be met with the current browser CSS support and CSS specification. That's why some of the features and functionalities are implemented at the cost of compromising web standards - we use some CSS hacks and ignore HTML semantics by using tables.

However, Telerik constantly pursues improving the standards compliance of its web controls and thus we created a rendering mode for RadInput and RadDateTimePicker in which no tables are used. Instead of being rendered inside a table, now the textbox can be rendered inside a span element. The condition is that the label and image buttons are not used.

Here is a KB article which demonstrates how to add custom labels and image buttons and make them work like the controls' native ones. We added this standard-compliant rendering feature very short time before Q3 2007 SP1 was released (on January 14, 2008), and we found a couple of issues related to HTML validation afterwards. That is why the attached project runs with custom build assemblies of RadInput for ASP.NET and RadControls Prometheus. If anyone would like to obtain developer versions, please contact our Support team.

Standard Compliant RadInput and RadDateTimePicker With No Tables

About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

Related Posts


Comments are disabled in preview mode.