Place div beneath another div

Discussion in 'HTML' started by CaptCaveman1, Feb 6, 2011.

  1. CaptCaveman1

    CaptCaveman1 Guest

    I have the following layout:

    <div>
    <div style="float: right"><img src.... /></div>
    <div>Page Title</div>
    </div>
    <div>
    More text
    </div>

    I want the bottom div to appear below the first div. However, it is
    showing directly below the Page title text.

    How can I get the bottom div to appear below the bottom part of the
    first div?
     
    CaptCaveman1, Feb 6, 2011
    #1
    1. Advertising

  2. CaptCaveman1

    dorayme Guest

    In article
    <
    m>,
    CaptCaveman1 <> wrote:

    > I have the following layout:
    >
    > <div>
    > <div style="float: right"><img src.... /></div>
    > <div>Page Title</div>
    > </div>
    > <div>
    > More text
    > </div>
    >
    > I want the bottom div to appear below the first div. However, it is
    > showing directly below the Page title text.
    >
    > How can I get the bottom div to appear below the bottom part of the
    > first div?


    You have 4 divs, the container div with two child divs, that's
    three. And you have another one. What exactly is not appearing
    where you want it to appear?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html;
    charset=utf-8">
    <title>4 divs</title>
    </head>
    <body>
    <div>1st div
    <div style="float: right;"><img src="pics/crimson.png"
    width="100" height="10" alt="">2nd div</div>
    <div>3rd div</div>
    </div>
    <div>4th div</div>
    </body>
    </html>

    --
    dorayme
     
    dorayme, Feb 6, 2011
    #2
    1. Advertising

  3. CaptCaveman1

    richard Guest

    On Sat, 5 Feb 2011 17:59:30 -0800 (PST), CaptCaveman1 wrote:

    > I have the following layout:
    >
    > <div>
    > <div style="float: right"><img src.... /></div>
    > <div>Page Title</div>
    > </div>
    > <div>
    > More text
    > </div>
    >
    > I want the bottom div to appear below the first div. However, it is
    > showing directly below the Page title text.
    >
    > How can I get the bottom div to appear below the bottom part of the
    > first div?


    <div>

    <div style="float:left">Page title</div>
    <div style="float:right"><img src=""></div>

    </div>
    <div style="clear:both;">
    more text
    </div>

    You could also pay a visit to www.oswd.org and see thousands of free
    examples.
     
    richard, Feb 6, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?=22Gabri=EBl=40Home=22?=

    Strange white block beneath the page in FF

    =?ISO-8859-1?Q?=22Gabri=EBl=40Home=22?=, Jan 30, 2006, in forum: HTML
    Replies:
    5
    Views:
    423
    Mark Parnell
    Feb 1, 2006
  2. Replies:
    0
    Views:
    357
  3. Ka
    Replies:
    10
    Views:
    704
    Richard Bos
    Jul 31, 2003
  4. Jonathan  Ellis

    Creating a div that obscures content beneath it

    Jonathan Ellis, Dec 22, 2004, in forum: Javascript
    Replies:
    3
    Views:
    97
  5. CRPietschmann
    Replies:
    1
    Views:
    264
    marss
    Apr 28, 2006
Loading...

Share This Page