简体   繁体   中英

Images not aligning properly in table row but text is

I've got a very simple table with images I am trying to horizontally align. The text in the same row is aligning properly but the img is not. My HTML code is

       <td><td class="auto-style2" style="text-align: center;">
        <p><img alt="" src="http://www.launchpointsecurity.com/image/data/L7000.jpg" style="width: 75px; height: 60px;" /></p>

        <p><strong>Control Panel</strong></p>
        </td>

and my CSS is

.auto-style2 {
text-align: center;
border-width: 1px solid #000000;
}

Pretty straight forward code, can't figure out for the life of my why its not aligning the image properly.

A live example can be seen at https://www.launchpointsecurity.com/index.php?route=bestblog/article&blog_article_id=1

我在jsfiddle中测试了你的代码,我看到img是居中的。

check here: https://jsfiddle.net/dquinonez/mvcd3sos/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM