Reply to Re: simple image + text CSS layout question

Your name:

Reply:


Posted by dorayme on 05/04/07 01:08

In article
<1178238663.268847.199600@y80g2000hsf.googlegroups.com>,
Ciaran <cronoklee@hotmail.com> wrote:

> Hi does anyone know how to set the bottom margin of a left floated
> image to match the height of it's container? For example:
>
> <div style="width:200px; background-color:#CCCCCC">
> <img src="image.jpg" style="margin-right:20px; width:65px; float:left"/
> >
> long text long text long text long text long text long text long text
> long text long text long text long text long text long text long text
> long text
> </div>
>
> This example displays a simple image and text. I want the text to stop
> wrapping beneath the image once the text clears the bottom of the
> image. I want it to stay in line all the way down regardless of the
> amount of text. Obviously it's easy with tables but what's the css
> alternative?
>
> Cheers,
> Ciarαn

What you can do is float a div left, specify it to contain the
img etc, and have another div alongside of it with a left margin
equal or a little bit greater than the width of the floated div.
If you have text in this second div, it will be go down the page
without wrapping under the pic. If you want a demo, you post a
url first with an attempt.

--
dorayme

[Back to original 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация