On Mar 20, 8:12pm, Gus Richter <gusrich...@netscape.net> wrote:
> liketofindout...@gmail.com wrote:
> > so eric.j had a nice solution on
>
> > http://www.sitepoint.com/forums/show...81#post3761981
>
> > it is simplest... and probably can lead to more understanding of the
> > inline elements (probably need to read some reference like the CSS
> > Definitive guide by Eric Meyer)
>
> Found it! ;-)
> Check this out for all possibilities:
> <http://www.student.oulu.fi/~laurirai/www/css/middle/>
> By: Lauri Raittila
erik.j's solution doesn't work? really? coz it works for me... using
IE 7 and Firefox 2
this first version is the one that doesn't work:
<div style="border:1px solid blue;width:500px; margin: 0 auto">
<img style="border:1px dashed orange" src="pic.jpg" alt="pic">Hello
</div>
and then, just by adding vertical-align to the image:
<div style="border:1px solid blue;width:500px; margin: 0 auto">
<img style="border:1px dashed orange;vertical-align:middle"
src="pic.jpg" alt="pic">Hello
</div>
now it will work. this might be the simplest solution. why the
vertical-align is added to the image part... i think reading more on
inline elements is needed to fully understand it.