简体   繁体   中英

Position fixed not working in Chrome

I applied position:fixed to my site-footer, it's working in Firefox, but in Chrome it's not fixed bottom. Can you please give me some advice?

.site-footer { 
background-color: #231F20;
padding-top: 20px;
padding-bottom: 30px;
position: fixed;
bottom: 0px;
left: 0px;
right: 0px; 
}

<footer id="test" class="site-footer col-md-12">
    <div class="site-info">
        <div class="col-md-4">
    <a href="/contact" class="btn btn-contact">Contact</a> <a href="#" class="btn btn-about">Terms</a>
    </div>

        <div class="col-md-8">
            Copyright &copy; <?php echo date('Y');?> <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a> - <?php bloginfo('description'); ?>.<br />

        </div>          
    </div><!-- .site-info -->
</footer>

I really appreciate any help. Thank you!

I think you might have a collision with the bootstrap classes. Maybe you can add

position: fixed !important;

in the css to overwrite bootstraps styling

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM