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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set padding in the WinForms HTMLIUI Control?

Platform: WinForms |
Control: HTMLUIControl


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.


<head><style type="text/css">
table, th, td { border: 2px solid Red; }
th, td { padding: 20px; }
<table style="width:40%" >
    <th>First Name</th>
    <th>Last Name</th>  
</ul><hr><p class='title'>Objectives</p><p style="padding-left:10px">This is Syncfusion HTMLUI Control, that shows the padding effect</p><ul>


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

Set the padding in HTMLUIControl



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.



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

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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
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.

Up arrow icon

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

Live Chat Icon For mobile