If I understand correctly, any valid CSS can be placed into the custom.css file. Take a look at the source provided with the "Top designs" article, specifically the style.css file.
That article used ids to achieve different formatting for each table but you could just apply the desired CSS styles directly to the appropriate HTML tags. For instance, your image is from their "Box 3" example, which used the ids box-table-a and box-table-b and the corresponding formatting is
#box-table-a
{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
margin: 45px;
width: 480px;
text-align: left;
border-collapse: collapse;
}
#box-table-a th
{
font-size: 13px;
font-weight: normal;
padding: 8px;
background: #b9c9fe;
border-top: 4px solid #aabcfe;
border-bottom: 1px solid #fff;
color: #039;
}
#box-table-a td
{
padding: 8px;
background: #e8edff;
border-bottom: 1px solid #fff;
color: #669;
border-top: 1px solid transparent;
}
#box-table-a tr:hover td
{
background: #d0dafd;
color: #339;
}
#box-table-b
{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
margin: 45px;
width: 480px;
text-align: center;
border-collapse: collapse;
border-top: 7px solid #9baff1;
border-bottom: 7px solid #9baff1;
}
#box-table-b th
{
font-size: 13px;
font-weight: normal;
padding: 8px;
background: #e8edff;
border-right: 1px solid #9baff1;
border-left: 1px solid #9baff1;
color: #039;
}
#box-table-b td
{
padding: 8px;
background: #e8edff;
border-right: 1px solid #aabcfe;
border-left: 1px solid #aabcfe;
color: #669;
}
My CSS is a little rusty but I believe all you need to do is:
- Choose either style
a or b
- Remove the entries not related to the chosen style
- Replace the standalone
#box-table-X with table
- Remove the
#box-table-X prefixes from other styles
- Place resulting CSS code inbetween
<style>..</style> tags in your custom.css file
P.S. this is basic CSS behavior -- applying styles directly to HTML tags. You could also specify formatting on a per-table basis by skipping steps 3 and 4 and placing an ID in the opening table tag (in the markdown cell):
<table id="box-table-a">
...
Edit: smashingmagazine.com doesn't like having its resources linked offsite; visit their article to get the source.zip file.
__rerp_html__. Here's the DataFrames: github.com/pydata/pandas/blob/master/pandas/core/frame.py#L464 github.com/pydata/pandas/blob/master/pandas/core/format.py#L504 May also be helpful, but I don't know how flexible it is. I haven't played with it at all._repr_html_code you linked, the return isreturn ('<div style="max-height:1000px;' 'max-width:1500px;overflow:auto;">\n' + self.to_html(max_rows=max_rows, max_cols=max_cols, show_dimensions=show_dimensions) + '\n</div>')What Im wondering is whether the "style" attribute controls the table style..