Help Code đặt banner lớn bên phải như vnxf

Group Zalo của Cộng đồng người dùng XenForo tại Việt Nam

phankt

Corporal
Chào mọi người.
Em tìm mấy ngày nay nhưng không tìm ra code css để treo 1 banner như diễn đàn vnxf.vn.
upload_2016-9-7_22-32-7.png


Em hi vọng đươc mọi người trợ giúp.

Xin cảm ơn mọi người!
 
  • Like
Reactions: THB
đây bác. chèn vào template ad_sidebar_bottom nhé. thay đường dẫn nhé
PHP:
<xen:hook name="ad_sidebar_bottom" />
<div class="bnbreak"></div>
<div class="section rightside">
<div class="secondaryContent statsList" style="padding: 0">
    <div style='height:600px; width:290px;margin: 0 auto'>
<a href="http://muabanraovatphuquoc.com/index.php" target="_blank" ref="dofollow">
<img src="http://vnxf.vn/anh/BANNER300600.jpg" border="0" width="100%" class="img_ad"></a>
    </div>       
  </div>
</div>

    <script type='text/javascript'>
    var lht = window.location.href;
    //if(lht.indexOf('.t') != -1) {
    $(window).bind("scroll", function () {
        var banner = $(".rightside");
        var diemdau = $(".bnbreak").offset().top;
        var diemcuoi = $(".footer").offset().top - 140;
        var trang = $(".mainContainer");
        var cuoitrang = trang.offset().top + trang.height();
        var cuoibanner = banner.offset().top + banner.height();
        if ($(this).scrollTop() > diemdau && cuoibanner < cuoitrang) {
            if($(this).scrollTop() < diemcuoi - banner.height()) {
                banner.css({top: 5, position: 'fixed'});
            } else {
                banner.css({position: 'fixed', top: diemcuoi - $(this).scrollTop() - banner.height() - 18, width: 300});
            }
        } else {
            banner.css({position: 'static', top: ''});
        }
    }) 
    //} else $(".rightside").hide();
    </script>
 
Back
Top