2013-06-27 4 views
1

를 이동하지 않습니다 나는 다음과 같은 코드가 있습니다텍스트 셀의 앉아 중동,

<table border="0" cellspacing="0" cellpadding="0" width="130" align="left"> 
<tbody> 
<tr> 
<td><a title="View Member" href="$$app_url$$/member/profile/index.cfm?profileid=24215649&amp;wldsite=$$site_id$$" target="_blank"><img style="border: 1px solid #666; border-radius: 5px; display: block;" src="http://s.wldcdn.net/newsletters/uploads/assets/000/026/770/336cc11b947060b2ef2bf68ddc2f0c05_original.jpg?1372264611" alt="" width="145" /></a></td> 
</tr> 
<tr> 
<td width="130" height="16"> 
<p style="text-align: center; font-size: 15px; font-family: Arial, Helvetica, sans-serif;"><span style="text-decoration: underline;"><strong><a title="View Member" href="$$app_url$$/member/profile/index.cfm?profileid=24215649&amp;wldsite=$$site_id$$" target="_blank">George</a></strong></span></p> 
</td> 
</tr> 
</tbody> 
</table> 

내가 왜 모르거나 2 행의 중앙에 나타나는 이름을 수정합니다. 이미지 바로 아래에 나타나기를 원하지만 이미지 하단에 더 가까이 앉을 수 있도록 올바른 코드 조합을 파악할 수는 없습니다.

추신 : 그것이 이유는 전자 메일 뉴스 레터의 일부입니다.

도움을 주시면 감사하겠습니다.

+0

명확히하십시오 : "나는 그것이 바로 뒤에 표시 할 이미지 ... "는 이미지가 텍스트와 겹치는 것을 의미합니까? –

+0

전자 메일 클라이언트는 HTML/CSS를 잘 렌더링하지 못하는 것으로 유명합니다. 최신 브라우저에서 잘 작동하는 기술은 Outlook과 같은 이메일 클라이언트에서 비참하게 실패합니다. –

+1

@MarcAudet 아래로 변경되도록 업데이트했습니다. 사과. – Ben

답변

1

빠른 수정 :

<table border="0" cellspacing="0" cellpadding="0" width="130" align="left"> 
<tbody> 
<tr> 
<td><a title="View Member" href="$$app_url$$/member/profile/index.cfm?profileid=24215649&amp;wldsite=$$site_id$$" target="_blank"><img style="border: 1px solid #666; border-radius: 5px; display: block;" src="http://s.wldcdn.net/newsletters/uploads/assets/000/026/770/336cc11b947060b2ef2bf68ddc2f0c05_original.jpg?1372264611" alt="" width="145" /></a></td> 
</tr> 
<tr> 
<td width="130" height="16" style="vertical-align: top; text-align: center; font-size: 15px; font-family: Arial, Helvetica, sans-serif;"> 
<strong><a style="text-decoration: underline;" title="View Member" href="$$app_url$$/member/profile/index.cfm?profileid=24215649&amp;wldsite=$$site_id$$" target="_blank">George</a></strong> 
</td> 
</tr> 
</tbody> 
</table> 

이 문제는 기본적으로 상단과 하단 여백이있는 <p> 태그이었다.

스타일을 통합 했으므로 p 또는 span 요소가 필요하지 않습니다.

또한 관심 표 셀에 vertical-align: top을 추가하십시오.

단락의 기본 여백을 제외하고는 거의 가깝고 간과하기 쉽습니다.

바이올린 데모 : http://jsfiddle.net/audetwebdesign/fEPLB/

PS

내가 대신 링크의 링크 텍스트 주위에 <strong>을 ... 둘 것

+1

고마워, 트릭 완료 :) – Ben

관련 문제