Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.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_Positioning - Fatal编程技术网

Html 调整挡块的位置

Html 调整挡块的位置,html,positioning,Html,Positioning,我希望有一个html块,包含一个描述和一个内容块 我有以下代码 <div id="bloc"> <span style="display:inline-block"> Description </span> <span> Long content ... </span> </div> 但我更喜欢吃这样的东西 descr : content ...... end of content 如何防

我希望有一个html块,包含一个描述和一个内容块

我有以下代码

<div id="bloc">
    <span style="display:inline-block"> Description </span>
    <span> Long content ... </span>
</div>
但我更喜欢吃这样的东西

descr : content ......
        end of content
如何防止额外的内容进入descr?
谢谢您的帮助。

从语义的角度来看,您可以更好地将
div
float
左/右组合使用


请参阅。

确实如此,但您应该为浮动div添加一个宽度,否则它们将位于不同的行上。
descr : content ......
        end of content