'Trying to edit the position of TradingView widget

I am fairly new to programming. I am trying to edit the position of the TradingView widget. It is automatically centered on the screen and I would like it to be on the left. How can I do this via CSS?As you can see from my image attached, I would like the widget to be at the start of the black line at the top



Solution 1:[1]

There is no need to do it with CSS, it is a very simple solution that can be done inside the tag of the widget.

I assume this is the widget you are referring to from Tradingview.com:

<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_d85a3"></div>
  <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/NASDAQ-AAPL/" rel="noopener" target="_blank"><span class="blue-text">AAPL Chart</span></a> by TradingView</div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "autosize": true,
  "symbol": "NASDAQ:AAPL",
  "interval": "D",
  "timezone": "Etc/UTC",
  "theme": "dark",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "container_id": "tradingview_d85a3"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

In that case, you are going to want to add align="left" in the div of the widget, so you end up with <div class="tradingview-widget-container" align="left"> at the beginning of the widget.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 just a fellow coder