Reputation: 2827
Im creating an E-mail signature with CSS and I'm having a problem getting the text vertical aligned next to a simple image.
Ive tried both valign and Vetical-align, yet none of both works. Who can help out?
I've made a quick roundup of whats inside my code at the moment.
or just in code:
<table style="width:500px; font-family:century gothic; font-size:10">
<tr><td><p style="color: #184d95; font-weight:bold">Company</p></td></tr>
<tr><td><img src="http://i42.tinypic.com/xauvbp/5.jpg" border="0" width="20" height="20"> Phone</td></tr>
<tr><td><img src="http://i44.tinypic.com/2d2f6kx.jpg" border="0" width="20" height="20"><a href="mailto:[email protected]" style="color:black; text-decoration:none">Mail</a></td></tr>
<tr><td><img src="http://i41.tinypic.com/2j4ebg5.jpg" border="0" width="20" height="20"> <a href="http://site.nl" style="color:black; text-decoration:none">Site</a></td></tr>
</table>
Thanks!
Upvotes: 2
Views: 2802
Reputation: 1309
Hi test with this code :
<table style="width:500px; font-family:century gothic; font-size:10">
<tr><td><p style="color: #184d95; font-weight:bold; height:20px; vertical-align:middle;">Company</p></td></tr>
<tr><td><img src="http://i42.tinypic.com/xauvbp/5.jpg" border="0" width="20" height="20" style="vertical-align:middle;"> Phone</td></tr>
<tr><td><img src="http://i44.tinypic.com/2d2f6kx.jpg" border="0" width="20" height="20" style="vertical-align:middle;"><a href="mailto:[email protected]" style="color:black; text-decoration:none; height:20px; vertical-align:middle;"> Mail</a></td></tr>
<tr><td><img src="http://i41.tinypic.com/2j4ebg5.jpg" border="0" width="20" height="20" style="vertical-align:middle;"><a href="http://site.nl" style="color:black; text-decoration:none; height:20px; vertical-align:middle;"> Site</a></td></tr>
</table>
Upvotes: 3
Reputation: 8981
try this
if you MAKE CLASS
please use this css
table tr img{
height:20px;
vertical-align:middle;
}
if you write INLINE CSS
please use
<table style="width:500px; font-family:century gothic; font-size:10">
<tr><td><p style="color: #184d95; font-weight:bold">Company</p></td></tr>
<tr><td><img src="http://i42.tinypic.com/xauvbp/5.jpg" border="0" width="20" height="20" style="vertical-align:middle;"> Phone</td></tr>
<tr><td><img src="http://i44.tinypic.com/2d2f6kx.jpg" border="0" width="20" height="20" style="vertical-align:middle;"> <a href="mailto:[email protected]" style="color:black; text-decoration:none">Mail</a></td></tr>
<tr><td><img src="http://i41.tinypic.com/2j4ebg5.jpg" border="0" width="20" height="20" style="vertical-align:middle;"> <a href="http://mennescreative.nl" style="color:black; text-decoration:none">Site</a></td></tr>
</table>
Upvotes: 1