KNOWLEDGE BASE

Center Aligning a Dashboard Published to Tableau Server


Published: 20 Aug 2014
Last Modified Date: 31 Oct 2016

Issue

How to center-align a dashboard published to Tableau Server. 

Environment

Tableau Server

Resolution

Add the following code to the embed HTML "share" code when embedding the view into a web page:
margin: auto;

For example: 
<script type='text/javascript' src='http://localhost/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 1024px; height: 661px;margin: auto;'><object class='tableauViz' width='1024' height='661' style='display:none;'><param name='host_url' value='http%3A%2F%2Flocalhost%2F' /> <param name='site_root' value='' /><param name='name' value='Science&#47;DCCrimespotting' /><param name='tabs' value='no' /><param name='toolbar' value='no' /></object></div>

Cause

The ability to center-align published views is not currently available in Tableau Desktop or Tableau Server. 
Did this article resolve the issue?