|
Article relates to
|
RadSplitter for ASP.NET AJAX
|
|
Created by
|
Svetlina, Telerik
|
HOW-TO : RadSplitter which is 100% of the page and has margin applied
SOLUTION:
In order to apply margin to a RadSplitter which is 100% you cannot simply set margin to it or padding to its parent due to the box model. In order to achieve the visual result of a margin with a 100% sized RadSplitter you should go through the following steps:
1) Configure the RadSplitter to be 100% of the page (set Width and Height 100% and also set explicit height to all its parent elements including the html, body and form)
2) Set the HeightOffset property to the resultant sum of the top and the bottom desired margin
3) Set the desired top margin to the RadSplitter's wrapper DIV element by using CSS
4) The 3 steps above will ensure the 100% size with vertical margin applied. To set the horizontal margin, set it as a padding of the body element.
Sample code which demonstrates the above explained approach is available below:
A fully runnable demo is attached to the article.