skip to Main Content

I need to write Inline list-style-type with dash.

this works:

'<ul><li style="list-style-type: '-' "> text </li></ul>'

But I use XtraReport and there it doesnt. There has to be quotation mark ‘ at the begining and at the end.

I edited the question.

3

Answers


  1. Use ‘ for inside the inline, to avoid confusion to closing style property.

    Also, close <li> tag first before closing <ul> tag.

    So, instead of:

    <ul><li style="list-style-type: "- ";"> text </ul></li>
    

    use:

    <ul><li style="list-style-type: '- ';"> text </li></ul>
    
    Login or Signup to reply.
  2. – Item 1

    – Item 2

    – Item 3

    "<ul style="list-style-type: none; padding: 0;">
      <li style="display: inline; list-style-type: none;">
        <span>&ndash; Item 1</span><br>
      </li>
      <li style="display: inline; list-style-type: none;">
        <span>&ndash; Item 2</span><br>
      </li>
      <li style="display: inline; list-style-type: none;">
        <span>&ndash; Item 3</span><br>
      </li>
    </ul>
    "
    

    added the style attribute to the element to remove the default bullet points by setting list-style-type: none and added some additional styling to remove any default padding using padding

    Each list item (

  3. ) has the display: inline property to make them appear inline, and the list-style-type: none property is set to remove any default list-style-type.
  4. Inside each list item, the – HTML entity is used to represent the dash character.

Login or Signup to reply.
  • first i would like to suggest you the correct syntax-

    <ul><li> list item 1 </li></ul>
    

    here you can see that i first closed the li then ul while you have reverse the process. which is technically not good.
    i can help you to create list with dash symbol but you need to use traditional styling. i don’t have a inline solution. Please let me know if you are interested

    Login or Signup to reply.
  • Please signup or login to give your own answer.
    Back To Top
    Search