How can I change the width of a Bootstrap 3 modal in IE8?

前端 未结 6 1137
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 19:47

I have to support IE8. The modal itself works fine, but my attempts to resize it (which work fine in Firefox) don\'t work in IE8.

I\'m just adding a class (wide-mod

6条回答
  •  悲哀的现实
    2020-12-29 20:23

    This will of course change the width for all of your modal windows, but it might give you a better idea on how this works. I just changed my modal windows this way.

        .modal-body {
            position: relative;
            padding: 20px;
            min-width: 800px; /* SET THE WIDTH OF THE MODAL */
        }
    
        .modal-content {
            position: relative;
            background-color: #fff;
            border: 1px solid #999;
            border: 1px solid rgba(0,0,0,0.2);
            border-radius: 6px;
            outline: 0;
            -webkit-box-shadow: 0 3px 9px rgba(0,0,0,0.5);
            box-shadow: 0 3px 9px rgba(0,0,0,0.5);
            background-clip: padding-box;
            width: 900px; /* SET THE WIDTH OF THE MODAL */
            margin: 50px 0 0 -150px; /* CHANGE MARGINS TO ACCOMMODATE THE NEW WIDTH */
        }
    
    
    
    
      Launch demo modal
    
      
      
    

提交回复
热议问题