【发布时间】:2015-03-28 18:00:43
【问题描述】:
我正在处理我的关于页面,但遇到了问题。尝试将(年或待定)与列的右侧对齐。例如,请参见图像。
顶部是它现在的样子。底部图像是我希望它的外观。
【问题讨论】:
标签: html css text-align
我正在处理我的关于页面,但遇到了问题。尝试将(年或待定)与列的右侧对齐。例如,请参见图像。
顶部是它现在的样子。底部图像是我希望它的外观。
【问题讨论】:
标签: html css text-align
尝试使用 span 然后设置样式等于 'float:right'
<span style="float:right">pending </span>
【讨论】:
style 属性。请改用.class。
css
ul {
list-style: none;
}
#about ul li span {
float: right;
}
html
<div id="about">
<h3><strong>Education</strong></h3>
<ul>
<li><strong>Golden West College – Huntington Beach, CA <span>2012-2014</span></strong>
</li>
<li>– Associate in Arts Degree – Digital Arts Major <span>(pending)</span>
</li><br/>
<li>Certificate of Achievement</li>
<li>– Graphic Design and Production Option <span>(pending)</span>
</li><br/>
<li>Certificate of Specialization</li>
<li>– Graphic Design Foundation <span>6/2014</span>
</li>
<li>– Graphic Design Advanced Production <span>(pending)</span>
</li>
</ul>
</div>
【讨论】:
给你
<ul>
<strong>Golden West College – Huntington Beach, CA <span style="float:right">2012-2014</span></strong><br>
– Associate in Arts Degree – Digital Arts Major <span style="float:right">(pending)</span><br>
<br> Certificate of Achievement<br>
– Graphic Design and Production Option <span style="float:right">(pending)</span><br>
<br> Certificate of Specialization<br>
– Graphic Design Foundation <span style="float:right">6/2014</span><br>
– Graphic Design Advanced Production <span style="float:right">(pending)</span><br>
</ul>
这是一个 JSFiddle Click here
【讨论】: