# Weird CSS bug with dash-table-experiments

**URL:** <https://community.plotly.com/t/weird-css-bug-with-dash-table-experiments/11064>\
**Category:** Dash Python\
**Created:** [June 20, 2018, 2:36pm UTC](https://community.plotly.com/t/weird-css-bug-with-dash-table-experiments/11064 "2018-06-20T14:36:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bright](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@Bright](https://community.plotly.com/u/Bright)\
**Post date:** [June 20, 2018, 2:36pm UTC](https://community.plotly.com/t/weird-css-bug-with-dash-table-experiments/11064/1 "2018-06-20T14:36:34Z")

</div>

Hi,

I have a weird bug regarding dash-table-experiments with css external\_url working while if the css is locally hosted it doesn’t work.

See follow code below for external\_url. If the same css file is copied to locally, the page width is broken as it overflows.

External CSS:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/7/7be1ff7dab78c9a03e73cde192304964f50c632b.png)

Local CSS (Exact Same CSS):

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/5/5db7ac462f1f25798b084cce3930ecc46513bfd8.png)

import pandas as pd  
import numpy as np  
import dash  
import dash\_core\_components as dcc  
import dash\_html\_components as html  
import dash\_table\_experiments as dt  
from dash.dependencies import Input, Output, State

import plotly  
import plotly.plotly as py  
from plotly import graph\_objs as go  
from plotly.graph\_objs import \*  
from flask import Flask  
from flask import send\_from\_directory  
import pandas as pd  
import numpy as np  
import os  
import copy

app = dash.Dash()

app.css.config.serve\_locally = False  
app.scripts.config.serve\_locally = True

app.css.append\_css({‘external\_url’: ‘[https://cdn.rawgit.com/plotly/dash-app-stylesheets/](https://cdn.rawgit.com/plotly/dash-app-stylesheets/)’  
‘2d266c578d2a6e8850ebce48fdb52759b2aef506/stylesheet-oil-and-gas.css’}) # noqa: E501

app.layout = html.Div([

```
html.Link(
    rel='stylesheet',
    href='/static/styles.css'
),    

```

#html.Link(  
#rel=‘stylesheet’,  
#href=’/static/mystyles.css’  
#),

```
#DATA TABLE
dt.DataTable(
    rows=[{}],
    columns=['Metric', '1801', '1802', '1803', '1804', '1805'],
    id='datatable',
),

```

],  
className=“container”)

@app.server.route(’/static/path:path’)  
def static\_file(path):  
static\_folder = os.path.join(os.getcwd(), ‘static’)  
return send\_from\_directory(static\_folder, path)

if **name** == ‘ **main** ’:  
app.run\_server(debug=True)

---

<div class="post-metadata">

**Author:** ![Bright](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@Bright](https://community.plotly.com/u/Bright)\
**Post date:** [June 20, 2018, 7:13pm UTC](https://community.plotly.com/t/weird-css-bug-with-dash-table-experiments/11064/2 "2018-06-20T19:13:08Z")

</div>

@chriddyp Hi Chris, would you know why its the CSS is different externally or internally hosted? I been trying to fix this for many many hours. Thanks

---

<div class="post-metadata">

**Author:** ![Bright](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@Bright](https://community.plotly.com/u/Bright)\
**Post date:** [June 21, 2018, 3:11pm UTC](https://community.plotly.com/t/weird-css-bug-with-dash-table-experiments/11064/3 "2018-06-21T15:11:37Z")

</div>

Can anyone please see why?
