I have a problem making the text inside the <td>
tags align to the left when drawing a list of data in Jupyter notebook as an HTML table. I'm on Jupyter 5.0.0.
from IPython.display import HTML
s = """<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>row 1, cell 1xxxxx</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2xxxxxxxx</td>
</tr>
</table>"""
HTML(s)
The text in the cells is aligned to the right. What is strange is that at another machine with the same version of Jupyter, the text is aligned to the left.
In the sample notebook, their HTML td
text is aligned to the left:
http://nbviewer.jupyter.org/github/ipython/ipython/blob/4.0.x/examples/IPython%20Kernel/Rich%20Output.ipynb#HTML
What are the css settings in the Jupyter notebook that control the alignment?