Using CSS, is it possible to vertically align centrally text to an image as you can using tables?
A simple example using a table would be
<table border="0" width="100%">
<tr>
<td><img border="0" src="image.gif" width="609"height="115"></td>
<td valign="middle">Ray did this</td>
</tr>
</table>
Using CSS so far I've got...
<p><img class="imglft" border="0" src="img.jpg" width="434" height="400" alt="my image">Ray did this>
The CSS for imglft is...
.imglft{
float: left;
margin-right: 30px;
}
I've tried putting the whole lot in a DIV and using text-align: middle and vertical-align: middle but that doesn't work.
You can see what I mean by comparing or with or
Ray
A simple example using a table would be
<table border="0" width="100%">
<tr>
<td><img border="0" src="image.gif" width="609"height="115"></td>
<td valign="middle">Ray did this</td>
</tr>
</table>
Using CSS so far I've got...
<p><img class="imglft" border="0" src="img.jpg" width="434" height="400" alt="my image">Ray did this>
The CSS for imglft is...
.imglft{
float: left;
margin-right: 30px;
}
I've tried putting the whole lot in a DIV and using text-align: middle and vertical-align: middle but that doesn't work.
You can see what I mean by comparing or with or
Ray