div problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bryce (Work)

    div problems

    I have a page that's being dynamically generated.

    It has 2 parts, which I want to display on top of each other (not
    overlapping, but one after the other). I won't know the height of the
    1st part until run time.

    Now, to compound the problem, each part has elements inside it that
    are absolute positioned inside its box.

    I have tried to use <div style="position :absolute">, but I need to
    know the top and height of the 1st part in order to place the 2nd part
    (which I don't).

    Of course using <div> tags without a position:absolu te style will
    place the parts one after the other, but then the contained elements
    are then positioned inside the browser as opposed to the desired
    result; positioned inside its containing box.

    Any suggestions? Tips?
  • Ivo

    #2
    Re: div problems


    "Bryce (Work)" <spamtrap@berze rker-soft.com> wrote in message
    news:jsggnv41jl fpbdnft8qo08edv eonvnuf91@4ax.c om...[color=blue]
    > I have a page that's being dynamically generated.
    >
    > It has 2 parts, which I want to display on top of each other (not
    > overlapping, but one after the other). I won't know the height of the
    > 1st part until run time.
    >
    > Now, to compound the problem, each part has elements inside it that
    > are absolute positioned inside its box.
    >
    > I have tried to use <div style="position :absolute">, but I need to
    > know the top and height of the 1st part in order to place the 2nd part
    > (which I don't).
    >
    > Of course using <div> tags without a position:absolu te style will
    > place the parts one after the other, but then the contained elements
    > are then positioned inside the browser as opposed to the desired
    > result; positioned inside its containing box.
    >
    > Any suggestions? Tips?[/color]

    Wait with layout and positioning until runtime. Users may witness a funny
    looking page while loading, but many sites work that way, including some
    sections at microsoft.com.
    Ivo


    Comment

    • Bryce (Work)

      #3
      Re: div problems

      On Tue, 30 Sep 2003 05:21:32 +0200, "Ivo" <no@thank.you > wrote:
      [color=blue]
      >
      >Wait with layout and positioning until runtime. Users may witness a funny
      >looking page while loading, but many sites work that way, including some
      >sections at microsoft.com.
      >Ivo[/color]

      yea, I ended up implementing with some javascript onload. Works, I
      just pray to god none of my clients have turned off JavaScript in
      their browsers...

      Comment

      • Brian

        #4
        Re: div problems

        Bryce (Work) wrote:[color=blue]
        >
        > I ended up implementing with some javascript onload. Works, I
        > just pray to god none of my clients have turned off JavaScript in
        > their browsers...[/color]

        lol perhaps you should rely on something more material than prayer

        --
        Brian
        follow the directions in my address to email me

        Comment

        • Stephen Poley

          #5
          Re: div problems

          On Tue, 30 Sep 2003 16:16:59 -0400, "Bryce (Work)"
          <spamtrap@berze rker-soft.com> wrote:
          [color=blue]
          >On Tue, 30 Sep 2003 05:21:32 +0200, "Ivo" <no@thank.you > wrote:
          >[color=green]
          >>Wait with layout and positioning until runtime. Users may witness a funny
          >>looking page while loading, but many sites work that way, including some
          >>sections at microsoft.com.[/color][/color]
          [color=blue]
          >yea, I ended up implementing with some javascript onload. Works, I
          >just pray to god none of my clients have turned off JavaScript in
          >their browsers...[/color]

          Estimates of visitors with Javascript off or unavailable range from 10%
          to 20%, so you may need to rethink that one.

          The absolute minimum you need to do would be a warning to the reader
          that the page will display strangely without Javascript. But my view is
          that doing a table-based layout is preferable to doing a CSS layout
          which breaks without Javascript.

          --
          Stephen Poley


          Comment

          • Bryce (Work)

            #6
            Re: div problems

            On Wed, 01 Oct 2003 10:33:04 +0200, Stephen Poley
            <sbpoleySpicedH amTrap@xs4all.n l> wrote:
            [color=blue][color=green]
            >>yea, I ended up implementing with some javascript onload. Works, I
            >>just pray to god none of my clients have turned off JavaScript in
            >>their browsers...[/color]
            >
            >Estimates of visitors with Javascript off or unavailable range from 10%
            >to 20%, so you may need to rethink that one.
            >
            >The absolute minimum you need to do would be a warning to the reader
            >that the page will display strangely without Javascript. But my view is
            >that doing a table-based layout is preferable to doing a CSS layout
            >which breaks without Javascript.[/color]

            I wish I could... Table layout would be best in our situation, but
            that would involve a total rewrite as opposed to a quick solution...
            Thank god we are replacing this app with something better...


            Comment

            • I V

              #7
              Re: div problems

              On Mon, 29 Sep 2003 10:42:55 -0400, Bryce (Work) wrote:[color=blue]
              > I have tried to use <div style="position :absolute">, but I need to
              > know the top and height of the 1st part in order to place the 2nd part
              > (which I don't).
              >
              > Of course using <div> tags without a position:absolu te style will
              > place the parts one after the other, but then the contained elements
              > are then positioned inside the browser as opposed to the desired
              > result; positioned inside its containing box.[/color]

              position: relative also creates a new containing box. I often find that
              positioning the main content div relatively, and any additional divs
              absolutely allows me to get the layout I want without knowing the height
              of the divs involved.

              --
              "Okay, this time I'm Poison Ivy, you're Harley Quinn, and we're pulling a
              daring heist of an adult novelty goods store."


              Comment

              Working...