2017-04-13 4 views
0

내 페이지에는 많은 패널과 그룹화 텍스트가 있습니다. 두 패널의 경우 그룹화 텍스트가 가운데 정렬되어야합니다.정렬 방법 페이지 중심의 여러 패널 중에서 두 개의 패널 만 텍스트 그룹화를 정렬 하시겠습니까?

legend { 
margin:0 auto; 

}

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

그러나 모든 패널 센터의 그룹화 텍스트를 만들 것입니다 : 나는 노력했다. 그룹화 텍스트 센터를 두 개의 패널에만 정렬해야합니다. 친절하게 도와주세요.

+0

'text-align : center'을 사용 하시겠습니까? 추측하면, 전체 코드 없이는 말하기가 어렵습니다. 아마도 바이올린을 만드시겠습니까? –

+0

@indira 다음과 같이 grouptext center와 클래스를 적용하고자하는 요소에 사용자 정의 스타일 이름을 추가하는 방법 :'.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>

나는이 도움이되기를 바랍니다.

관련 문제