html - 将 DIV 向上移动一行

标签 html css

是否有任何 CSS 属性可以将“Paul D Kelly”移动到 Member 的前面。我有这个要求,我不能在除 Paul D Kelly Span 的父 div 之外的任何其他 DIV 中添加任何属性。我在上面尝试了几个显示值,但前提是我在 Member 和 Paul D Kelly div 上都给出了 display:inline-block,它们会排成一行,但我想找到一种方法,通过在中添加一个属性来使它们排成一行Paul D Kelly DIV.

<div style="position:absolute; top:17.8pt; left:40.8pt; width:223.8pt; height:54pt; border:0pt solid black;border:1px solid red">
    
    
<div style="position:relative;width:62pt;height:15.25pt; line-height:0.5;">
<span style="white-space:pre-wrap; line-height:12pt; font:normal 10pt Helvetica; color:rgb(0,0,0)">Member:</span>
</div> 

<div style=" position:relative; left:2.16pt;width:92pt;height:12pt; line-height:0.5;">
<span style="white-space:pre-wrap; line-height:12pt; font:normal 10pt Helvetica; color:rgb(0,0,0)">PAUL D KELLEY</span>
</div> 
    
    
</div> 

最佳答案

您可以使用display:flexdisplay:inline-flex

检查 jsfiddle:

http://jsfiddle.net/swapnilmotewar/p8nf67d5/

关于html - 将 DIV 向上移动一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28044411/

相关文章:

html - 33% + 33% + 34% 与 iOS 上的 100% 宽度不同

html - HTML 中的时事通讯是否应该具有 "table-based"布局?

javascript - 输入谷歌地图方向

html - 如何将 html 复选框变成图标

javascript - CSS3 支持 ie6,7,8

css - spring boot静态内容

html - 无法将 polymer 元件垂直居中在全出血体内

javascript - 在一个 img 标签中一个接一个地加载两个图像

html - 使用不使用空格的语言使一段文本不间断

css - 控制div的宽度