CSS container errors everywhere - Javascript appears when page has shrunk

↘锁芯ラ 提交于 2019-12-13 22:01:42

问题


having an issue with a javascript element.

<a class="twitter-timeline" href="https://twitter.com/Account" data-widget-id="395882390205108224">Tweets by @Twitter</a><script type="text/javascript">// <![CDATA[
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
// ]]></script>

This is linked in with my other question I think but not 100% as this is regarding the JS element.

On JSFiddle it works fine, I can shrink the element and it appears. On my website it doesn't appear unless I shrink the browser down.

http://jsfiddle.net/MLJpY/

Before:

After:

URL: http://profiledt.co.uk/SetTraining/


回答1:


You assigned a fixed height to the container for this elements.

CSS:

#frontpage-Button-Cont {
width: 100%;
height: 135px;
text-align: center;
}

the height attribute (works in chrome then) or add overflow: auto to have it in a container with scroll bars

#frontpage-Button-Cont {
width: 100%;
height: 135px;
text-align: center;
overflow: auto;
}


来源:https://stackoverflow.com/questions/20123227/css-container-errors-everywhere-javascript-appears-when-page-has-shrunk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!