Results 1 to 5 of 5

Thread: CSS : How to float outside parent div

  1. #1
    Join Date
    May 2008
    Posts
    260

    CSS : How to float outside parent div

    Hello,

    I have read few tutorials on the right or left and suddenly I am trying to do a little simple layout:

    A large block div that contains all named container (i:e the parent block)

    Header inside a div to an image of high
    below I want two div; one to the left, one right.
    This is where it gets stuck ..

    I put a div and another, the two are one in dessou the other normal.
    I put a div in the normal and the other div float right.
    In fact I have one of my div (the one that does not float) which does extend automatically formatting my parent div (called container), but the float right, starts well below the header div, but ends outside the container div (in fact, it does not extend the formatting of the container div).

    Could you help me?

  2. #2
    Join Date
    May 2008
    Posts
    347

    Re: How to float outside parent div

    Normal. Content floating ... floating above the rest.

    Try this:

    Code:
    <div> 
      <div style="width: 32px; height: 32px; background: black; float: right;"> BLAH </ div> 
      </ div> 
      <div style="clear: both;"> </ div>

  3. #3
    Join Date
    May 2008
    Posts
    260

    Re: How to float outside parent div

    It does not help, I tried to make clear: both on any layer (except float right) but it not work either.

  4. #4
    Join Date
    May 2008
    Posts
    347

    Re: How to float outside parent div

    And a link to the page if possible? (with Firebug, I look directly).

    In any case, I believe that you should try a <div style="clear: both;"> </ div> after the party left.

  5. #5
    Join Date
    May 2008
    Posts
    260

    Re: How to float outside parent div

    Your solution worked! I added a div with the attributes that you told me just after my two div (block the flow right, and normal or to my txt (left), and it works.

    Without name-thank you, solved!

Similar Threads

  1. Casting int to float in C
    By Jensen Ackles in forum Software Development
    Replies: 4
    Last Post: 05-04-2010, 05:08 PM
  2. Difference between double and float
    By garfield1 in forum Software Development
    Replies: 5
    Last Post: 06-03-2010, 04:13 PM
  3. What are parent::construct() and parent::destruct() in PHP?
    By warehouse peon in forum Software Development
    Replies: 5
    Last Post: 06-03-2010, 07:11 AM
  4. CSS float disappeared the background
    By addie in forum Software Development
    Replies: 3
    Last Post: 29-06-2009, 05:49 PM
  5. How to make a CSS div float OVER another div
    By Warner in forum Software Development
    Replies: 3
    Last Post: 21-05-2009, 10:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,572,066.65127 seconds with 17 queries