Title: Lists inside a cell adding breaks?
Last modified: August 20, 2016

---

# Lists inside a cell adding breaks?

 *  Resolved [Richtpt](https://wordpress.org/support/users/richtpt/)
 * (@richtpt)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/)
 * I’ve created an unordered list inside a cell. Very basic. Inside the cell I have
   typed:
 *     ```
       <ul>
          <li><a href="file.pdf">Download this</a></li>
        </ul>
       ```
   
 * (there are other list items but they all look like this.)
    When I display the
   page I notice a big gap between each list item. Viewing the page source I notice
   there’s a `<br />` after each `</li>`. I didn’t put it there and I can’t figure
   out how to remove it. I don’t want it, it’s making my list look really ugly. 
   How can I get ride of the break? Thanks! (and sorry, the page is password protected,
   I don’t have another place to put it.)
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Richtpt](https://wordpress.org/support/users/richtpt/)
 * (@richtpt)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532200)
 * I just tried adding line-height: 0; to the CSS in the plugin options page and
   that seems to have worked. I’d still like to know why it’s adding a break for
   me when I don’t want it, but at least I have a work around.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532391)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * The reason for this is indeed in the code that you pasted into the cells: It 
   contains line breaks, which are automatically transformed to HTML line break 
   tags when the table is shown. This is what adds the white space. (For regular
   text, this is a good feature, as it allows you to use the “Enter” key in table
   cells. For HTML code like this, it causes the problem you are experiencing).
 * To change this, you’ll just have to remove all line breaks from the code, so 
   that the entire button code would stand in one line of text (if you drag the 
   table cell input field wide enough). Thus, only line breaks that happen automatically
   due to the width of the textareas are allowed.
    Does this make sense? So, in 
   your case, just write the code as
 *     ```
       <ul><li><a href="file.pdf">Download this</a></li></ul>
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Richtpt](https://wordpress.org/support/users/richtpt/)
 * (@richtpt)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532430)
 * Ah, gotcha. I wrote the html outside the plugin then imported the table. so I
   had it formatted so it looked nice. Maybe add a section in the FAQ about this–
   I have no problem with it, nice to know what is going on and how to fix it. THANKS!!!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532431)
 * Hi,
 * yes, I should add this to the FAQ, indeed! Good suggestion 🙂 Thanks!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  Thread Starter [Richtpt](https://wordpress.org/support/users/richtpt/)
 * (@richtpt)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532437)
 * Done! 🙂 I did say in my review one thing I would love is in the table editing
   it would be nice to be able to set the font and font size instead of using CSS,
   but that’s super easy to do. I’m setting this site up for non-programmers to 
   be able to administrate and maintain. Really like this plugin! Thanks again!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532439)
 * Hi,
 * thanks for the feedback, I really appreciate it!
 * Yes, I agree that styling should be easier, but so far I haven’t really found
   a solution that is easy to implement, suits all (or at least most) needs, and
   is flexible enough 🙁 So, for now I’ll stick to “Custom CSS”.
 * Best wishes,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Lists inside a cell adding breaks?’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [break](https://wordpress.org/support/topic-tag/break/)
 * [list](https://wordpress.org/support/topic-tag/list/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * 6 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/lists-inside-a-cell-adding-breaks/#post-3532439)
 * Status: resolved