Twitter bootstrap - images not showing

前端 未结 3 1908
醉话见心
醉话见心 2021-01-16 13:41

I have a website which works fine in Google Chrome, but not in other browsers (Firefox, Safari).

I\'m having a problem with the following section of code:

         


        
相关标签:
3条回答
  • 2021-01-16 13:56

    I can't replicate what you're seeing, but I don't have Firefox 11, however, a few things: the markup on that page is seriously outdated. Ditch <center> element, etc, and get rid of all the deprecated elements. Then validate the markup and styles. I noticed your first img has a closing </img> element... that's not valid and I'm willing to bet it's what's causing your issue(s).

    Remember, validation is your friend.

    0 讨论(0)
  • 2021-01-16 14:02

    From the bootstrap documentation:

    Requires HTML5 doctype

    Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.

    Currently you have:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN">
    

    As a doctype, so fix that, validate and try again to see if it works.

    0 讨论(0)
  • 2021-01-16 14:08

    If your image is not showing in firefox and it is meant to take the full width of your browser, make sure you add the class="container-fluid"

    0 讨论(0)
提交回复
热议问题