这是非常简单的,但我对这种行为感到完全困惑。我希望我的搜索结果以每行2个方块的漂亮网格显示。但实际上,当具有更多文本的div推开其他内容时,它会变得歪斜。我该如何解决这个问题?
以下是一个简化的示例,显示在FF和Chrome中出现的问题:
<html>
<body>
<style>
.search_result
{
border: thin solid;
width: 250px;
height:200px;
display: inline-block;
}
</style>
<div style='width:508px'>
<div class='search_result'>
Meerkats demonstrate altruistic behavior within their colonies; one or more meerkats stand sentry while others are foraging or playing, to warn them of approaching dangers ...
</div>
<div class='search_result'>
one or more meerkats stand sentry
</div>
<div class='search_result'>
meerkats
</div>
</div>
</body>
</html>