2012-04-05 11 views
1

動作していないテキストの単一行を揃え、私は過去にこの問題を持っていたし、スタックオーバーフローのウェブサイト上でソリューションの助けを借りて、それを解決し私は、単一の行のテキストを正当化するために必要

I can't justify single line text using CSS in asp.net

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

私には分からないミスをしているかもしれません。私はフィドラーリンクこれは、Webフォームに& C#を使用してASP.Netのウェブサイトの開発者のためであるhttp://jsfiddle.net/pp9hb/2/

職業は開発者ですが、現在のプロジェクトに同様のデザインの仕事をしなければならない

解決策:以下の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%; 
} 
+1

あなたの例で何を達成したいのですか? –

+0

@Clark:私は間違いがあります。私は一行のテキストを正当化する必要があります。実際には、各数字の隣にあるテキストが例のように表示されています。 – Learning

+0

正直言って、それはテーブルでなければなりません。 – Kyle

答えて

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%; 
} 
3

こんにちは、あなたがこの

のCss Pなど、このCSSスタイルシートを定義し、H1 {テキスト整列:正当化。 テキスト揃え-最後:正当化;}

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/

+0

この問題に直面しているすべてのブラウザ間で – Learning