)
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: June 24, 2019).
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 |
Published Date: May 27, 2015 |
Last Revised Date: January 3, 2020

Padding

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.

HTML

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

 

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

Set the padding in HTMLUIControl

 

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.

 

Samples:

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.
ADD COMMENT
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
Live Chat Icon