Formatting UL and LI elements in htmlTextBox

2 posts, 0 answers
  1. Saba
    Saba avatar
    4 posts
    Member since:
    Oct 2015

    Posted 22 Oct 2015 Link to this post

    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>

    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?

  2. Nasko
    Nasko avatar
    909 posts

    Posted 27 Oct 2015 Link to this post

    Hello Saba,

    A pure CSS solution would look like this:
    ul,li { list-style-type: none;
            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">

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top