【问题标题】:Align end Quote with text at the end将 end Quote 与末尾的文本对齐
【发布时间】:2013-09-23 21:15:56
【问题描述】:

我想将结束引号与下面的结束文本内联。 但我的 HTML 呈现如下 ::

所以,我想把结束引号放在最后一行。 但在某些分辨率下,它会显示在下一行。

我的 HTML 是

<span style="leftquote">
     <img alt="Quote" src="../../Images/Static/Quote_Start.png" class="startQuote" />    
</span>
<span class="contentSection">
    test text test text test text test text
    <img alt="Quote" src="../../Images/Static/Quote_End.png" class="endQuote" />
</span>

下面是我的css::

.leftquote { display: inline; }
.startQuote
{
    vertical-align: baseline;
    padding-right: 10px;
    float:left;
}

.contentSection
{
    display: block;
    width: 89%;
    padding-top: 8px;
}
.endQuote
{
    vertical-align: text-top;
    padding-left: 10px;
}

那么有什么办法可以解决这个问题呢?

【问题讨论】:

    标签: html alignment double-quotes


    【解决方案1】:

    检查我的 jsFiddle:http://jsfiddle.net/xGjD2/1/

    <blockquote class="style3">
        <span>test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test 
        </span>
    </blockquote>
    

    和CSS:

    blockquote.style3 {
          font: 18px/30px normal Tahoma, sans-serif;
          padding-top: 22px;
          margin: 5px;
          background-image: url(http://www.8p-design.com/templates/base/images/white/quote_left.png);
          background-position: top left;
          background-repeat: no-repeat;
          text-indent: 65px;
      }
    
      blockquote.style3 span {
          display: block;
          background-image: url(http://www.8p-design.com/templates/base/images/white/quote_left.png);
          background-repeat: no-repeat;
          background-position: bottom right;
      } 
    

    【讨论】:

    • 嗨,我检查了你的 js fiddle。我通过在您的内容中添加“test1 test2 t”来检查它,结果它会显示相同的问题(在下一行引用)。 (仅供参考:我的分辨率是 1366 X 768)
    • 现在即使结果不完全相同,它也可以工作:jsfiddle.net/xGjD2/3。使用您的代码,图像表现为一个字符,如果它进入下一行是正常的。
    • @Danovan :: 再次尝试了您的解决方案,因为您已经为图像提供了位置。所以它会保持在右下角。(这不是预期的)。我还通过添加一些内容进行了检查。添加此额外文本后,它显示文本和结束引号相互重叠。(这是不期望的)。
    猜你喜欢
    • 2019-05-29
    • 1970-01-01
    • 1970-01-01
    • 2019-08-07
    • 2022-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-30
    相关资源
    最近更新 更多