Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在情态动词中创建列?_Html_Modal Dialog_Bootstrap Modal - Fatal编程技术网

Html 如何在情态动词中创建列?

Html 如何在情态动词中创建列?,html,modal-dialog,bootstrap-modal,Html,Modal Dialog,Bootstrap Modal,我查看了bootstrap站点,发现代码无法与我的PHP一起使用。这是代码…我试图把图像放在一列,标题和内容放在第二列,这样就不需要滚动。它把所有的东西都放在一个狭窄的柱子上,而不是两个 <div class="modal fade" id="person-<?php echo $n; ?>" tabindex="-1" role="dialog" aria-labelledby="person-<?php echo $n; ?>Label" ar

我查看了bootstrap站点,发现代码无法与我的PHP一起使用。这是代码…我试图把图像放在一列,标题和内容放在第二列,这样就不需要滚动。它把所有的东西都放在一个狭窄的柱子上,而不是两个

         <div class="modal fade" id="person-<?php echo $n; ?>" tabindex="-1" role="dialog" aria-labelledby="person-<?php echo $n; ?>Label" aria-hidden="true">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h5 class="modal-title" id="person-<?php echo $n; ?>Label"></h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
                </button>
              </div>
              <div class="modal-body">
                <div class="container-fluid">
                    <div class="row">
                        <div id="person-<?php echo $n; ?>">
                            <div class="col-4, col-sm-6">
                                <?php the_post_thumbnail('full', array('class'=>'img-fluid team-image')); ?>
                            </div>
                            <div class="col-8, col-sm-6">
                                <h2><?php the_title(); ?></h2>
                                <?php the_content(); ?>
                            </div>
                        </div>
                    </div>
                </div>

如果使用得当,modals中的列与其他HTML中的列的工作方式相同。在您的示例中,
.row
div中没有
.col
div

将内容移动到两个单独的
div.col
列,如下所示:

<div class="row" id="person-<?php echo $n; ?>">
    <div class="col">
        <?php the_post_thumbnail('thumbnail', array('class'=>'img-fluid team-image')); ?>
    </div>
    <div class="col">
        <h2><?php the_title(); ?></h2>
        <?php the_content(); ?>
    </div>
</div>

似乎更像是HTML/CSS问题,而不是PHP问题。对不起……我确实这么做了,但它所做的只是将所有内容放在一个细长的列中。我在缩略图上画了第4列,在标题和内容上画了第8列……你必须把
.col
作为
.row
的直接子行(
.row
.col
)。删除
Oh duh:)谢谢!(这是我的第一个网站…如果你不知道的话)