dpmwy80068 2018-03-05 16:33
浏览 28

使用bootstrap 4将小部件移动到网页的右侧

I want the information tag to be at the right side of the web page. Rest of the things are in the middle of the page. While I am not able to move the information to the right side. Also, because of it the footer disappeared. While I remove the information code, the footer works. Please help me right-align the information widget and also have the footer too.

<div class="container">
         <div class="card border-light mb-3 text-center">
            <p class="card-header">Videos</p>
        </div>
         <div id="userSuccess" class="hide" role="alert">
            <div id="successUserContent"></div>
        </div>
        <div class="row" id="userVid"> 
            <?php
            $allVid = Schema::getAll();
            for ($i = 0; $i < count($allVid); $i++) {
                echo <<<HTML
                <div class="col-lg-4 col-md-6 mb-4">
                    <div class="card h-100">  
                        <div class="card-body">
                            <a href="vid.php"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
                            <h4 class="card-title">{$allVid[$i]->getTitle()} </h4>
                        </div> 
                    </div> 
                </div>
    HTML;
            }
            ?>   
        </div>    
        <div class="row">
        <div class="col-md-4 order-md-2 mb-4">
        <div class="card my-4">
                    <h5 class="card-header">Information</h5> 
                    <div class="card-body">  
                        <div class="row">
                                <ul class="list-unstyled mb-0">  
                                    <li>
                                        ...  
                                    </li>
                                </ul>                         
                        </div>
                    </div>        
                </div>
        </div>
        </div> 
    </div>
<?php
require_once './page/footer.php';
?>
  • 写回答

1条回答 默认 最新

  • douren5898 2018-03-05 16:39
    关注

    For right align, you'll want to add the class of "justify-content-end" after your "row" class.

    <div class="row justify-content-end"><!-- ADDED HERE-->
      <div class="col-md-4 order-md-2 mb-4">
        <div class="card my-4">
          <h5 class="card-header">Information</h5>
            <!-- REST OF YOUR CODE-->
    

    For your footer, you'll need to wrap your URL in parenthesis.

    <?php require_once('/yourdirectory/yourfooter.php'); ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度