2017-04-13 3 views
0

私のページには多くのパネルとグループ分けのテキストがあります。 2つのパネルの場合、グループ化テキストを中央に揃えなければなりません。ページングセンターの多くのパネルのうち、2つのパネルのみのテキストをグループ化する方法はありますか?

legend { 
margin:0 auto; 

}

<asp:Panel ID="Panel13" runat="server" GroupingText="<b>Grouping Text</b>"> 
    <table> 
    <tr></tr> 
    </table> 
</asp:Panel> 

をしかし、それはすべてのパネルの中央のテキストをグループ化するようになります:私は試してみました。グループ化テキストセンターを2つのパネルにのみ配置する必要があります。親切に私を助けてください。

+0

'text-align:center'は多分?ちょうど推測、あなたの完全なコードなしで言うことは難しい。おそらくフィドルを作成しますか? –

+0

@indira Grouptextを中心にしたいクラスにカスタムスタイル名を追加し、クラスを次のように適用する方法について: '.customcss legend {margin:0 auto}' – Webruster

+0

@GurtejSinghコードが更新されました –

答えて

1

テキストを中央に揃えたい特定のクラスをパネルに与えます。以下の例を確認してください。

legend.align-centre { 
 
    text-align: center; 
 
    color: red; 
 
} 
 

 
legend { 
 
font-size: 16px; 
 
padding: 15px 0; 
 
}
<!DOCTYPE html> 
 
<html> 
 
<head> 
 
\t <title></title> 
 

 
</head> 
 
<body> 
 
    <legend class="align-centre">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend> 
 
    
 
    <legend>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend> 
 
    
 
    <legend>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend> 
 
    
 
    <legend>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type speci</legend> 
 
</body> 
 
</html>

私はこのことができます願っています。

関連する問題