<div class="container chat" style="width: 50%; margin: 0px auto;">
<div class="chat-bar"><h1>Wolf Valley Chat</h1></div>
<div class="chat-content">
<table>
<tbody>
<script id="cid0020000091912718480" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 800px;height: 350px;">{"handle":"wolfvalleychat","arch":"js","styles":{"a":"202020","b":91,"c":"FFFFFF","d":"FFFFFF","f":91,"i":91,"k":"202020","l":"202020","m":"202020","n":"FFFFFF","o":91,"p":"10","q":"202020","r":91,"t":0,"surl":0,"allowpm":0,"cnrs":"0.35","fwtickm":1}}</script>
</tbody>
</table>
</div>
</div>
這是我放在我的網站上的chatango chatbox的代碼。出於某種原因,它居中,但居中關閉。我該怎麼做才能糾正這個問題?爲什麼這個聊天室不會中心?
你需要設置表的和iframe的寬度爲100% –
好吧,我將寬度設置爲100%,但沒有它是完全偏向左邊 – invadingdingo
div.container需要保持你的問題有div.chat-content中的表格需要具有100%的寬度,因爲該表格內的iframe也是這樣 –