This is a migrated thread and some comments may be shown as answers.

Formatting UL and LI elements in htmlTextBox

3 Answers 71 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Saba
Top achievements
Rank 1
Saba asked on 22 Oct 2015, 10:52 PM

I am dynamically pulling in html to display an an htmlTextBox. I've modified the style of my <ul>s like so:

<ul style="padding: 0px">
    <li>test item</li>
</ul>

This is to remove the indentation that naturally occurs with unordered lists. Unfortunately, no matter how I manipulate the padding, the htmlTextBox will indent <li>s. 

Is there any way I can display an unordered list in an htmlTextBox without the indentation that usually occurs?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 27 Oct 2015, 01:47 PM
Hello Saba,

A pure CSS solution would look like this:
ul,li { list-style-type: none;
        list-style-position:inside;
        margin:0;
        padding:0; }

However, the HtmlTextBox does not support all of the above attributes.

To remove the indent you can set the negative padding to the ul:
<ul style="padding-left:-30px">
  <li>htmlTextBox1</li>
</ul>


Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wasenshi
Top achievements
Rank 1
answered on 26 Feb 2021, 05:24 AM

Hi,

 

Where can I find the list of all supported styles/attributes for htmltextbox ?

0
Neli
Telerik team
answered on 01 Mar 2021, 09:05 AM

Hi Wasenshi,

You can check the HtmlTextBox article:

Supported HTML tags section

Supported CSS attributes section

 

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Report Designer (standalone)
Asked by
Saba
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Wasenshi
Top achievements
Rank 1
Neli
Telerik team
Share this question
or