You are here: Re: Question: Aligning an image + text « HTML « IT news, forums, messages
Re: Question: Aligning an image + text

Posted by David Graham on 01/26/06 20:48

"Jonathan N. Little" <lws4art@centralva.net> wrote in message
news:43d8f174$0$8299$cb0e7fc6@news.centralva.net...
> David Graham wrote:
>
> >>CSS:
> >>.pixboxleft IMG {
> >>display: block;
> >>}
> >
> >
> > Hi
> > I understand your css OK but what is the display: block; for?
> > I commented this out and it doesn't seem to do anything. Why can't the
img
> > element remain an inline element?
> > thanks
> > David
> >
> >
> >
> Because images are displayed inline by default, if you do not explicitly
> set the width of the containing block element and with viewport is is
> wide enough the text will not wrap under image
>
> +------DIV-------+ The rest of
> |[ IMAGE ] text | your page
> +----------------+ content ...
>
> Image as block
>
> +----DIV--+ The rest of your
> |[ IMAGE ]| page content ...
> | text |
> +---------+
>
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIO
> http://www.LittleWorksStudio.com
Thanks for that Jonathan but did you see my later post about float right not
affected by display: block, it always behaves like that regardless of
whether it is stipulated in the css or not were as float left does need the
rule display:block. Why?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация