html - 我想为我的内容适当划分 div

标签 html css twitter-bootstrap codeigniter

1st image

在第一张图片中,我想要那种类型的内容,首先是标题,然后是描述,但在我的页面中它显示不正确。在下面的图片中显示了我的页面 div

my page div

我想在第一张图片上显示我的 div

我的代码:

<div class="row">
      <div class="col-sm-7 bannervideo" style="margin-left:15px">
      <iframe oncontextmenu="return false" class="video_container" style="width:100%;height:400px;" src="<?php echo $videoDetail[0]['video_links']?>?autoplay=1" frameborder="0" allow="autoplay" allowfullscreen></iframe>
      <h1 class="vc_custom_heading dividefirstline" style="font-family:'Open Sans', Arial, Helvetica, sans-serif;color:black;font-size:20px;font-weight:600;line-height:26px;word-break: break-all;"><?php echo $videoDetail[0]['course_title']?>
      </h1>
       <p style="font-family:'Open Sans', Arial, Helvetica, sans-serif;color:black;font-size:15px;line-height:26px;font-weight:400" class="secondline"><?php echo substr($videoDetail[0]['video_description'],0,100);?></p>
      </div>
      <div class="col-sm-4 bannervideo">
         <b>Up next</b>
         <div class="row">
            <div class="col-sm-6 pointer relvideo">
               <iframe width="1280" height="150" src="https://www.youtube.com/embed/R2PuVo2U5ak" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
            </div>
            <div class="col-sm-3">
               <p>Here Comes Title</p>
            </div>
            <div class="col-sm-3">
               <p>it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
            </div>
         </div>
         <br><br>
      </div>
   </div>

最佳答案

您的标题和描述应该在同一列中。

   <div class="row">
      <div class="col-sm-7 bannervideo" style="margin-left:15px">
         <iframe oncontextmenu="return false" class="video_container" style="width:100%;height:400px;" src="<?php echo $videoDetail[0]['video_links']?>?autoplay=1" frameborder="0" allow="autoplay" allowfullscreen></iframe>
         <h1 class="vc_custom_heading dividefirstline" style="font-family:'Open Sans', Arial, Helvetica, sans-serif;color:black;font-size:20px;font-weight:600;line-height:26px;word-break: break-all;"><?php echo $videoDetail[0]['course_title']?></h1>
         <p style="font-family:'Open Sans', Arial, Helvetica, sans-serif;color:black;font-size:15px;line-height:26px;font-weight:400" class="secondline"><?php echo substr($videoDetail[0]['video_description'],0,100);?></p>
      </div>
      <div class="col-sm-5 bannervideo">
         <b>Up next</b>
         <div class="container">
            <div class="row">
               <div class="col-sm-6 pointer relvideo">
                  <iframe width="1280" height="150" src="https://www.youtube.com/embed/R2PuVo2U5ak" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
               </div>
               <div class="col-sm-6">
                  <h2>Here Comes Title</h2>
                  <p>it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
               </div>
            </div>
         </div>
      </div>
   </div>

关于html - 我想为我的内容适当划分 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58429868/

相关文章:

jquery - HoverCard 中的 Bootstrap 下拉按钮

html - 在文本字段 HTML 中对齐占位符

javascript - 用文字制作三态切换

php - 根据选择器特异性排序 CSS

javascript - jquery 在加载时设置背景图像不起作用

javascript - Bootstrap 轮播图像超出框架

php - 使用 Laravel bootstrap css 仅对页面的一部分进行样式设置

javascript - 功能检测自动播放 HTML5 音频 - 移动浏览器上的音频

javascript - 更新一个 JavaScript 对象会更新所有对象

javascript - 将所有请求的元素设为此类名称