0

我有一个酒店列表和他们的标志在一张表中列出:

http://ranchocordovaeventscenter.com/partner-hotels/

所有徽标都在左栏中,所有文字都在右栏中。

我的问题是文本未在徽标旁边的单元格顶部对齐。

任何提示都会有所帮助。

这是我的一些代码:

<table border="0">
<tbody>
<tr>
<td valign="top"><a title="Comfort Inn &amp; Suites" href="http://www.comfortinnandsuitesrc.com" target="_blank"><img class="wp-image-440 alignleft" title="Comfort Inn &amp; Suites" alt="Comfort Inn &amp; Suites" src="http://ranchocordovaeventscenter.com/wp-content/uploads/2013/01/BIGcomfort-inn-logo.jpg" width="175" height="207" /></a></td>
<td valign="top">
<h3><b>Comfort Inn &amp; Suites-Rancho Cordova</b></h3>
<span style="font-size: small;">12249 Folsom Blvd., Rancho Cordova, CA</span>
<span style="font-size: small;"> <span style="line-height: 1.714285714;">Phone: 916-351-1213
</span><a style="line-height: 1.714285714; font-size: inherit;" href="http://www.comfortinnandsuitesrc.com/">http://www.comfortinnandsuitesrc.com</a></span></td>
</tr>
<tr>
<td valign="top"><a href="http://marriott.com/sacrc" target="_blank"><img class=" wp-image-455 alignleft" alt="Courtyard Marriott" src="http://ranchocordovaeventscenter.com/wp-content/uploads/2013/01/cy_logo.png" width="175" height="175" /></a></td>
<td valign="top">
<h3><span style="font-size: medium;"><b>Courtyard by Marriott-Rancho Cordova</b></span></h3>
<span style="font-size: small;">10683 White Rock Rd., Rancho Cordova, CA</span>
<span style="font-size: small;"> <span style="line-height: 1.714285714;">Phone: 916-638-3800
</span><a style="line-height: 1.714285714; font-size: inherit;" href="http://marriott.com/sacrc">http://marriott.com/sacrc</a></span></td>
</tr>
</tbody>
</table>
4

2 回答 2

0

您应该为所有文本行设置以下 css 属性:

float:right;
于 2013-04-07T23:29:23.383 回答
0

这是由于标题标签

...

try this code. i've used <div> tag applied styles for Font size instead of <h3>

 <table border="0">

                    <tr>
                        <td><a title="Comfort Inn &amp; Suites" href="http://www.comfortinnandsuitesrc.com" target="_blank">
                            <img class="wp-image-440 alignleft" title="Comfort Inn &amp; Suites" alt="Comfort Inn &amp; Suites" src="http://ranchocordovaeventscenter.com/wp-content/uploads/2013/01/BIGcomfort-inn-logo.jpg" width="175" height="207" /></a></td>
                        <td>
                            <div style="font-size:large"><b>Comfort Inn &amp; Suites-Rancho Cordova</b></div>
                            <span style="font-size: small;">12249 Folsom Blvd., Rancho Cordova, CA</span>
                            <span style="font-size: small;"><span style="line-height: 1.714285714;">Phone: 916-351-1213
                            </span><a style=" font-size: inherit;" href="http://www.comfortinnandsuitesrc.com/">http://www.comfortinnandsuitesrc.com</a></span></td>
                    </tr>
                    <tr>
                        <td><a href="http://marriott.com/sacrc" target="_blank">
                            <img class=" wp-image-455 alignleft" alt="Courtyard Marriott" src="http://ranchocordovaeventscenter.com/wp-content/uploads/2013/01/cy_logo.png" width="175" height="175" /></a></td>
                        <td>
                            <h3><span style="font-size: medium;"><b>Courtyard by Marriott-Rancho Cordova</b></span></h3>
                            <span style="font-size: small;">10683 White Rock Rd., Rancho Cordova, CA</span>
                            <span style="font-size: small;"><span style="line-height: 1.714285714;">Phone: 916-638-3800
                            </span><a style="line-height: 1.714285714; font-size: inherit;" href="http://marriott.com/sacrc">http://marriott.com/sacrc</a></span></td>
                    </tr>

            </table>
于 2014-05-02T14:11:41.070 回答