假设我在模态的主体中有一个引导模态。我有两个
<div>
这个
<div>
左侧包含一个图像,而
<div>
右侧包含图像的标题。
目标输出!
让我们假设这是一个引导模式体:
-------------- ----------------
| | | |
| | |Name: |
| <image> | |Description: |
| | |Price: |
| | | |
-------------- ----------------
不管两个div之间的空间如何,让我们假设它只是一个小空间。所以问题是我怎么才能把两个
<div>
在第一个
<div>
在左边,另一个在右边?
到目前为止,这是我所做的。
---------------
| |
| |
| <image> |
| |
| |
---------------
---------------
| |
| |
|Name: |
|Description: |
|Price: |
| |
---------------
其他的
<div>
而是向右向下。
这是我针对上述错误输出的代码。
CSS格式
#divforimg{
position: left;
}
#divforinfo {
position: right;
}
HTML格式
<div class="modal-body">
<div id = 'divforimg'>
<img style="height:50%; width:50%;" id = 'appimage'>
</div>
<div id = "divforinfo">
<i><p id = "appdesc"></p></i>
<strong>Price: </strong><label id = "appprice"></label><br>
<strong>Brand: </strong><label id = "appbrand"></label><br>
<strong>Color: </strong><label id = "appcolor"></label><br>
<strong>Model: </strong><label id = "appmodel"></label><br>
<strong>Available Quantity: </strong><label id = "appqty"></label><br>
<strong>Date Posted: </strong><label id = "appposted"></label><br>
</div>
</div>
不允许上面的图像源和其他字段。非常感谢。