We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set padding in the HTMLIUI Control?

Platform: WinForms |
Control: HTMLUIControl |
Published Date: May 27, 2015 |
Last Revised Date: May 27, 2015

In the HTMUI control, padding can be used to specify the space between the element’s border and its content. The left, right, top, and bottom padding attributes can also be specified independently. The uses of the padding attributes are as follows:


Padding: The padding attribute is used to specify a fixed space for all the four sides of the element’s contents.

Padding Left: The padding-left attribute is used to specify the padding for the left side of the element.

Padding Right: The padding-right attribute is used to specify the padding property at the right side of the HTML element.

Padding Top: The padding-top attribute specifies the padding at the top edge of the element.

Padding Bottom: The padding-bottom attribute specifies the padding at the bottom of the HTML element from its border.


The following code example demonstrates the same.



The following image shows the padding attribute used in the HTMLUI control


Note: The margin of the HTMLUI Control can be specified by using the padding attribute. Hence, the user can use the padding attribute instead of margin attribute.


Sample Links:

C# : http://www.syncfusion.com/downloads/support/directtrac/137701/HTMLUI496458222.zip

VB : http://www.syncfusion.com/downloads/support/directtrac/137701/HTMLUI_VB684676202.zip

You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon