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]
|