将元素与多行文本右侧对齐,没有边距

时间:2017-09-06 14:56:03

标签: html css

这有点难以解释。我有一个Private Sub CommandButton1_Click() Set myFile = Application.FileDialog(msoFileDialogOpen) With myFile .Title = "Choose File" .AllowMultiSelect = False If .Show <> -1 Then Exit Sub ElseIf .Show <> 0 Then FileSelected = .SelectedItems(1) End If End With 'data location & range to copy mydata = "='[FileSelected]'!$C$10:$C$21" '<< change as required 'link to worksheet With ThisWorkbook.Worksheets(1).Range("C10:C21") '<< change as required .Formula = mydata 'convert formula to text .Value = .Value End With End Sub 元素,有多行。一旦它破裂,右边就会有一些白色空间仍然向右推动另一个元素。

我想要实现的是,下一个元素位于inline-block like in this image的旁边。

这是我目前的解决方案,它没有提供预期的结果:

inline-block
div {
  background: #ccc;
  display: flex;
  align-items: center;
  max-width: 300px;
  margin-bottom: 10px;
}

span {
  display: inline-block;
  background: lightgreen;
}

0 个答案:

没有答案