Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 10:26 PM
Firas D.
Guest
 
Posts: n/a
Default Trouble with float

On the page:

http://firasd.org/temp/faq.html

How would I make the picture contain itself in the first grey <div>?
Basically, nudge it up and make the "This FAQ is compiled voluntarily
...." text wrap to its left?

In case someone wants to see the structure visually:
http://firasd.org/temp/outlined.gif

  #2  
Old July 20th, 2005, 10:26 PM
Neal
Guest
 
Posts: n/a
Default Re: Trouble with float

On Fri, 23 Jan 2004 17:29:43 -0500, Firas D. <fd-nospam-@firasd.org> wrote:
[color=blue]
> On the page:
>
> http://firasd.org/temp/faq.html
>
> How would I make the picture contain itself in the first grey <div>?
> Basically, nudge it up and make the "This FAQ is compiled voluntarily
> ..." text wrap to its left?
>
> In case someone wants to see the structure visually:
> http://firasd.org/temp/outlined.gif
>[/color]

Simplest way - put the img before the text.

<div class="note">
<div style="float: right"><img src="maestropic.png" alt=""></div>
<p>This FAQ is compiled ...
  #3  
Old July 20th, 2005, 10:26 PM
Michael Rozdoba
Guest
 
Posts: n/a
Default Re: Trouble with float

Firas D. wrote:[color=blue]
> On the page:
>
> http://firasd.org/temp/faq.html
>
> How would I make the picture contain itself in the first grey <div>?
> Basically, nudge it up[/color]

float the image before the text; the image div moves right...
[color=blue]
> and make the "This FAQ is compiled voluntarily ..." text wrap to its
> left?[/color]

....& the following text flows into the gap.

However this won't make the div contain the image if the image remains
taller than the flowed text. See
http://www.complexspiral.com/publica...aining-floats/

To overcome this problem, you need an object following the text which is
forced to clear the preceeding floated image & will remain in the div
boundary (or you can make the parent div itself floated, as floats do
expand to contain floats).

I thought the following should work, but it doesn't. Leastways, it seems
to in Mozilla, but in IE6 the paragraph texts vanish. Probably me being
stupid. Hopefully you'll get a more helpful answer shortly.

<div class="note">
<div style="float: right"><img src="maestropic.png" alt=""></div>
<p>[snip text]</p>
<p>[snip text]</p>
<hr style="display: block; clear: right; visibility: hidden; margin:
-0.2em 0;" />
</div>

--
Michael
m r o z a t u k g a t e w a y d o t n e t
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles