How to keep tabs on the same row when printing the web page?

I am new to Dash. According to “dcc.Tabs | Dash for Python Documentation | Plotly”-- Method 2. Content as Tab Children, I created a Tabs with three tabs by using dcc.Tabs. It works fine and displays normally(the three tabs keep on the same row) on Chrome pages. But when I print it, the tabs displays in three rows. I tried to run the App on IE Edge and fireFox and style the tab-container with css, but got the same result. Could anyone help to solve the problem?

the code is as below:
‘’’
import dash
import dash_html_components as html
import dash_core_components as dcc

from dash.dependencies import Input, Output
from jupyter_dash import JupyterDash

app = JupyterDash(name)

external_stylesheets = [‘https://codepen.io/chriddyp/pen/bWLwgP.css’]

app.layout = html.Div([
dcc.Tabs([
dcc.Tab(label=‘Tab one’, children=[
dcc.Graph(
figure={
‘data’: [
{‘x’: [1, 2, 3], ‘y’: [4, 1, 2],
‘type’: ‘bar’, ‘name’: ‘SF’},
{‘x’: [1, 2, 3], ‘y’: [2, 4, 5],
‘type’: ‘bar’, ‘name’: u’Montréal’},
]
}
)
]),
dcc.Tab(label=‘Tab two’, children=[
dcc.Graph(
figure={
‘data’: [
{‘x’: [1, 2, 3], ‘y’: [1, 4, 1],
‘type’: ‘bar’, ‘name’: ‘SF’},
{‘x’: [1, 2, 3], ‘y’: [1, 2, 3],
‘type’: ‘bar’, ‘name’: u’Montréal’},
]
}
)
]),
dcc.Tab(label=‘Tab three’, children=[
dcc.Graph(
figure={
‘data’: [
{‘x’: [1, 2, 3], ‘y’: [2, 4, 3],
‘type’: ‘bar’, ‘name’: ‘SF’},
{‘x’: [1, 2, 3], ‘y’: [5, 4, 3],
‘type’: ‘bar’, ‘name’: u’Montréal’},
]
}
)
]),
])
])

app.run_server()
‘’’

Did you try running the app as a .py file from your local system? I think the tabs are arranged vertically because of the smaller window size of Jupyter Lab.

@atharvakatre Thank you for your advice. I had tried to run the app as a .py file, but the printing problem still occured. When I use jupyter notebook, by default, run_server displays a URL that I can click on to open the app in a browser tab. So, I displays the app on a new page, just like run the .py file from my local system. The problem only occur when printing the web page. In developer mode, the tabs displays normally with the ‘mobile’ type. I’m not sure if I can solve this problem by styling CSS?

@chriddyp Hi Chris, could you spend sometime to solve this problem? For more details, please refer to the problem description. I noted that when I changed the width from Tabs.react.js in developer mode, the printing problem can be solved. Does it mean I need to write a .js file to override the tab’s style? Even more, when I have many Tabs with different amount of tab in an App, how could I make it dynamically.