2014-04-10 2 views
1

누구든지 VML 텍스트 상자 내에서 바로 테이블을 정렬하는 방법을 알고 있습니까?VML 텍스트 상자 내에서 오른쪽으로 테이블 정렬 ???

을 Heres하고 코드

<table width="600" border="0" cellpadding="0" cellspacing="0" align="center"> 
    <tr> 
     <td bgcolor="#DDDDDD" style="background-image: url('http://i.imgur.com/XCnBXwP.png');" background="http://i.imgur.com/XCnBXwP.png" height="92" valign="top"><!--[if gte mso 9]> 
    <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px;height:92px;"> 
    <v:fill type="tile" src="http://i.imgur.com/XCnBXwP.png" color="#7bceeb" /> 
    <v:textbox inset="0,0,0,0"> 
    <![endif]--> 

      <div> 
       <table width="300" border="0" cellpadding="0" cellspacing="0" align="right"> 
        <tr> 
         <td bgcolor="#FF00FF" align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:20px; font-weight:bold;"> | This is test text | </td> 
        </tr> 
       </table> 
      </div> 

      <!--[if gte mso 9]> 
    </v:textbox> 
    </v:rect> 
    <![endif]--></td> 
    </tr> 
</table> 

답변

0

의 예는 <div>width:100%;에 설정해보십시오 .... 왼쪽과 중앙 잘 작동하지만 지금은 무시받을 것으로 보인다. 해결할 수 없다면 100 % 너비 테이블을 넣고 그 안에 자식 (원하는 내용)을 중첩 및 정렬합니다.

예 :

<table width="600" border="0" cellpadding="0" cellspacing="0" align="center"> 
    <tr> 
     <td bgcolor="#DDDDDD" style="background-image: url('http://i.imgur.com/XCnBXwP.png');" background="http://i.imgur.com/XCnBXwP.png" height="92" valign="top"><!--[if gte mso 9]> 
    <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px;height:92px;"> 
    <v:fill type="tile" src="http://i.imgur.com/XCnBXwP.png" color="#7bceeb" /> 
    <v:textbox inset="0,0,0,0"> 
    <![endif]--> 

      <div style="width:100%;"> 
       <table width="100%" border="0" cellpadding="0" cellspacing="0"> 
       <tr> 
        <td align="right"> 
        <table width="300" border="0" cellpadding="0" cellspacing="0" align="right"> 
         <tr> 
          <td bgcolor="#FF00FF" align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:20px; font-weight:bold;"> | This is test text | </td> 
         </tr> 
        </table> 
        </td> 
       </tr> 
       </table> 
      </div> 

      <!--[if gte mso 9]> 
    </v:textbox> 
    </v:rect> 
    <![endif]--></td> 
    </tr> 
</table> 
+0

인이 작동하지 않았다 아니 죄송합니다! 나는 두 테이블을 서로 옆에 놓을 수 있도록 테이블을 정렬 할 수 있어야합니다. 하나는 왼쪽으로 (잘 작동하지만) 오른쪽 정렬은 완전히 무시됩니다! – harte11

+0

두 줄의 ''을 같은 줄에 넣으면 어떨까요? 정렬은 화면 너비가 축소 될 때 내용이 오버플로 (팝 다운)되도록하려는 경우 적합합니다 (적합하지 않음). ''을 사용하면 항상 서로 옆에있게됩니다. 또한 정렬하려는 경우 두 방향을 같은 방향으로 정렬해야합니다. 대부분의 클라이언트는 부모 인 '에 의해 구동되기 때문에 부동/정렬 된 테이블 자체에 충돌하는 방향을 지정하면 일관성없는 결과가 발생합니다. – John

0

죄송합니다, 늦게 파티에 오는 ...

은 당신이 테이블 & 내용보다 먼저 정렬 = "오른쪽"와 별도의 사업부가 필요합니다. VML 텍스트 상자는 어떤 이유로 든 테이블의 정렬을 무시합니다.

<table width="600" border="0" cellpadding="0" cellspacing="0" align="center"> 
    <tr> 
     <td bgcolor="#DDDDDD" style="background-image: url('http://i.imgur.com/XCnBXwP.png');" background="http://i.imgur.com/XCnBXwP.png" height="92" valign="top"><!--[if gte mso 9]> 
     <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px;height:92px;"> 
     <v:fill type="tile" src="http://i.imgur.com/XCnBXwP.png" color="#7bceeb" /> 
     <v:textbox inset="0,0,0,0"> 
     <![endif]--> 

     <div> 
      <div align="right"> 
       <table width="300" border="0" cellpadding="0" cellspacing="0" align="right"> 
        <tr> 
         <td bgcolor="#FF00FF" align="right" style="font-family:Arial, Helvetica, sans-serif; font-size:20px; font-weight:bold;"> | This is test text | </td> 
        </tr> 
       </table> 
      </div> 
     </div> 

     <!--[if gte mso 9]> 
     </v:textbox> 
     </v:rect> 
     <![endif]--> 
    </td> 
    </tr> 
</table> 

그리고 여기가 link