Site logo

Archived topic

Why is html code not responsive

7 replies · Started by Karsten on January 28, 2022

Viewing posts 1–8 of 8

Hey dear friends,

please check out this blog post.
I have a question regarding the black chart of Apple stock there.

The html code is put into a container. So I don't understand why the black chart is not responsive?

Thank you for your help.

Hi Kasten,

It's because the chart has a fixed width set:
https://postimg.cc/bScGhYLS

Try this CSS:

div#tradingview_6336a-wrapper, div#tradingview_6336a-wrapper > div {
    width: auto !important;
}

Hello Ying,

I have added the CSS but the chart is still not responsive. Do you have another idea how we could fix this?

The ID is changing, so I can't target it using its ID.

Try this CSS instead:

.tradingview-widget-container #analytics-platform >div, .tradingview-widget-container #analytics-platform >div >div {
    width: auto !important;
}

yes, thank you, Ying

Now it works.

But the problem is that I want to use this charts on other blog posts as well. Is there a more general CSS to address this chart widgets?

For example here I also use the chart widget.

I think the current CSS is pretty general.

As it's not a theme issue, the support we can offer would be limited.

It's better to reach out to the plugin's support for more help :)

okidoiki

thank you, you really helped me anyway.

Best

No problem :)

This archived topic is closed to new replies.