> On Mon, Apr 13, 2009 at 3:45 AM, Tim Dawson <t...@ramasaig.com 
> <mailto:t...@ramasaig.com>> wrote:
> 
>     I'm working on a site which has several images on the page
>     (300x225px).  Each
>     image has some descriptive text alongside, which generally is not as
>     high as the
>     image.  My client would like the text vertically centred on the image.
> 
>     http://www.mull-bed-and-breakfast.co.uk/newcrofts/self-catering.php
> 
>     CSS deliberately seems to avoid a v-align capability in paragraphs.
>      I realise I
>     could introduce padding, but that would have to be tailored for
>     every piece of
>     text. Tables allow v-align in cells, I know, but I don't want to go
>     that route
>     either  Is there a better way, please ?
> 
>     Tim Dawson
> 
> 
> I just woke up, so roll with me here.
> 
> How about wrapping each image/text in a div/p combination. Since images 
> are inline elements, this should technically be the more semantic way of 
> doing it.
> 
> By wrapping the text inside a span, you should be able to open yourself 
> up to using the vertical-align property of CSS. 
> 
> -- 
> -Jack Timmons
> http://www.trotlc.com
> Twitter: @codeacula

Thanks, Jack.  My image/text are already in div/p combinations, as you suggest.
  I'll explore putting the text into a span.  Meanwhile the <br /> solution
(forcing the text down the para), while not good semantically, is quick and
flexible, particularly if the clients change their mind when they see the 
result.

Tim
-- 
Tim Dawson
Maolbhuidhe
Fionnphort
Isle of Mull  PA66 6BP

01681 700718

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to