1

私は単一行のテキストを正当化する必要があります、そして私は過去にこの問題を抱えていて、StackOverflowウェブサイトの解決策の助けを借りてそれを解決しました

asp.netでCSSを使用して1行のテキストを正当化することはできません

今、私はうまくいかない同様のことをしなければなりません私はフィドルにコードを置きました私は上記の解決策でさえこれがうまくいかないことを試みました。

気づかない間違いをしているのかもしれません。私は職業別の開発者ですが、現在のプロジェクトでも設計作業を行う必要があります

Fiddler Link http://jsfiddle.net/pp9hb/2/

これは、WebフォームとC#を使用するASP.NetWebサイト開発者向けです。

解決策:以下のCSSが機能しています。すべてのブラウザでテキストを正当化するようになりました

.Top10ArticleHeading
{
   text-align:Justify; 
   font-size:11px; 
    font-family:Tahoma, Geneva, sans-serif;  
    height:16px;
    color:black;
    padding-top:2px;
    text-decoration:none;
    width:160px;
}
.Top10ArticleHeading:after 
{
  content: "";
  display: inline-block;
  width: 100%;
}
4

2 に答える 2

3

こんにちは、このcssスタイルシートを次のように定義します

Css p、h1 {text-align:justify; text-align-last:justify;}

p:after, h1:after
{content: ".";
display: inline-block;
width: 100%;
height: 0;
visibility: hidden;}


h1
{height: 1.1em;
line-height: 1.1;
background:green;}

HTML

<h1>This is heading </h1>


<p>hello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo texthello demo text</p>

​

このhttp://kristinlbradley.wordpress.com/2011/09/15/cross-browser-css-justify-last-line-paragraph-text/に関する詳細情報

于 2012-04-05T08:48:16.413 に答える
0

解決策:以下のCSSが機能しています。すべてのブラウザでテキストを正当化するようになりました

.Top10ArticleHeading
{
   text-align:Justify; 
   font-size:11px; 
    font-family:Tahoma, Geneva, sans-serif;  
    height:16px;
    color:black;
    padding-top:2px;
    text-decoration:none;
    width:160px;
}
.Top10ArticleHeading:after 
{
  content: "";
  display: inline-block;
  width: 100%;
}
于 2012-04-08T11:05:41.277 に答える