How can I get the outer DIV to stretch horizontally

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • donpro

    How can I get the outer DIV to stretch horizontally

    Hi,

    If you look at my test page on: http://www.program-it.ca/test.html and
    look at the source, you'll see both the HTML and CSS code. My
    question is as follows:

    If I either increase the text size or shrink the window, the inner
    DIVS start to wrap below each other. What I really want is the outer
    DIV to stretch horizontally and the inner DIVS to remain next to each
    other on the same row.

    Can this be done?

    Thanks,
    Don
  • Chris F.A. Johnson

    #2
    Re: How can I get the outer DIV to stretch horizontally

    On 2008-08-13, donpro wrote:
    Hi,
    >
    If you look at my test page on: http://www.program-it.ca/test.html and
    look at the source, you'll see both the HTML and CSS code. My
    question is as follows:
    >
    If I either increase the text size or shrink the window, the inner
    DIVS start to wrap below each other. What I really want is the outer
    DIV to stretch horizontally and the inner DIVS to remain next to each
    other on the same row.
    I haven't looked at your CSS or HTML in detail, but I would
    make two suggestions:

    First, fix your code so that it is valid HTML (preferably
    4.01 strict) and CSS.

    Second, simplify your HTML. You have far too many nested
    DIVs.

    --
    Chris F.A. Johnson <http://cfaj.freeshell. org>
    =============== =============== =============== =============== =======
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

    Comment

    • Johannes Koch

      #3
      Re: How can I get the outer DIV to stretch horizontally

      donpro schrieb:
      If you look at my test page on: http://www.program-it.ca/test.html and
      look at the source, you'll see both the HTML and CSS code.
      I haven't looked at the code at all, but ...
      My
      question is as follows:
      >
      If I either increase the text size or shrink the window, the inner
      DIVS start to wrap below each other.
      .... I assume you are using the float property. The effect you describe
      is how a layout using float behaves.
      What I really want is the outer
      DIV to stretch horizontally and the inner DIVS to remain next to each
      other on the same row.
      Then don't use float. What you want could be done with the CSS table
      rendering model. See the corresponding section in the CSS specification.
      But AFAIK it's not implemented in any version of IE yet.

      --
      Johannes Koch
      In te domine speravi; non confundar in aeternum.
      (Te Deum, 4th cent.)

      Comment

      Working...