CSS Floating problem

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default CSS Floating problem

    Hi,

    I've been struggling with the following situation:

    I have DIV called "C" that contains two more DIVS called "A" and "B".
    These two DIVS are floated so they appear alongside eachother. The
    lenght of "A" and "B" is not known. On one page "A" has more content and
    is thus longer than "B" and on the other page it's vice versa.
    Now, because "A" has "float:left", whenever "B" is shorter than "A", a
    large part of "A" hangs out of DIV "C". If you know what I mean. The
    size of "C" is determined by "B", because it is not floated. "A" is
    taken out of the normal pageflow because it is floated and thus can't
    push "C" open.

    I want the length of "C" to be determined by the longest column (either
    "A" or "B"), so nothing "hangs out". Whatever I do can't seem to get
    this to work. Anyone have an idea?

    Thnx,
    Nicodemus.
    Nicodemus Guest

  2. Similar Questions and Discussions

    1. Important Problem with floating toolbar !
      Hi all! I developed a plug-in using Acrobat 8 SDK. When I start acrobat 9.0, click any floating toolbar on which all tool buttons have been...
    2. how to fix floating layer problem in one browser
      Wonder what to do to fix this persistent layer to work on IE 6 and/or 7 where this browser is the only one on which it won't scroll at all: ...
    3. floating ads
      Hello! Is anyone know how to make banner ads that float over the page (like at yahoo.com etc)? Thanks!
    4. Floating control panel problem
      Hello list! I have a really stupid, annoying problem. By mistake, I detached the control panel from the stage, and now I can't re-attach it. The...
    5. floating menu problem when using tables instead of layers
      CBrooks: First of all, this is really an urban legend. "Layers" are compatible with all v4+ browsers, but like any other tool, you must know...
  3. #2

    Default Re: CSS Floating problem

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Fordwebs Default</title>
    <style type="text/css">
    <!--
    #C {
    background-color:#CCCCCC;
    width: 700px;
    }
    #A {
    background-color: #990000;
    float: left;
    width: 350px;
    }
    #B {
    background-color: #336666;
    margin-left: 350px;
    }
    -->
    </style>
    </head>
    <body>
    <div id="C">
    <div id="A">Content for id "A" Goes Here</div>
    <div id="B">Content for id "B" Goes Here</div>
    </div>
    </body>
    </html>


    --
    Ken Ford
    Certified Dreamweaver MX 2004 Developer
    PVII Support Team
    [url]http://www.projectseven.com[/url]


    "Nicodemus" <i.like.my.spam.in@can.com> wrote in message news:c81utf$9l9$1@forums.macromedia.com...
    > Hi,
    >
    > I've been struggling with the following situation:
    >
    > I have DIV called "C" that contains two more DIVS called "A" and "B".
    > These two DIVS are floated so they appear alongside eachother. The
    > lenght of "A" and "B" is not known. On one page "A" has more content and
    > is thus longer than "B" and on the other page it's vice versa.
    > Now, because "A" has "float:left", whenever "B" is shorter than "A", a
    > large part of "A" hangs out of DIV "C". If you know what I mean. The
    > size of "C" is determined by "B", because it is not floated. "A" is
    > taken out of the normal pageflow because it is floated and thus can't
    > push "C" open.
    >
    > I want the length of "C" to be determined by the longest column (either
    > "A" or "B"), so nothing "hangs out". Whatever I do can't seem to get
    > this to work. Anyone have an idea?
    >
    > Thnx,
    > Nicodemus.

    Ken Ford - PVII Support Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139