我正在尝试创建一个div框列表

时间:2016-12-08 07:46:11

标签: html css

我正在尝试创建一个div框列表,但是当我放置它们时,第二个图像不是与容器的左侧齐平。

我想在两个div之间添加空格,使用边框在新闻文章之间创建一条线。如果您知道如何完成这项工作,请发表评论。 该页面什么都不做。它根本不接受任何样式命令。

我没有包含任何其他样式代码,因为这是唯一的工作样式代码。说实话,我可以删除wrap2样式,没有任何改变。



img.wrap {
  float: left;
  border: 1px solid black;
  margin: 10px 10px 20px;
}
img.wrap2 {
  float: left;
  border: 1px solid black;
  margin: 10px;
}

<div id="invisiblebox">
  <div id="nvidiablog1">
    <a href="https://blogs.nvidia.com/blog/2016/11/26/virtual-reality-flight-simluation/">
      <img src="images/virtual.jpg" class="wrap" height="100" width="100">
    </a>
    <p>According to a recent article posted by NVIDIA, Mass Virtual has been a long standing partner of the United States Navy. Mass Virtual's specialty is to provide the Navy with virtual reality training simulators, and boy did they deliver. Mass Virtual's
      newest training simulator which, to quote the article written by John Chaney <i>"is beyond visual range"</i>. To read more about this article please click the image to be redirected.</p>
  </div>
  <div id="nvidiablog2">
    <a href="https://blogs.nvidia.com/blog/2016/11/28/titan-supercomputer-ethanol/">
      <img src="images/titan.jpg" class="wrap2" height="100" width="100">
    </a>
    <p></p>
  </div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

.container {显示:弯曲;}

删除float