<div> contents in same position?

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

    <div> contents in same position?

    Hello,

    I have a series of <divblocks which I want to appear in the same
    position on the page, one after the other.

    Can I do this with css/javascript?

    At the moment one <divblock is visible and the other 3 invisible.
    Once the first block has been used I want it to become invisible and
    the second block to become visible and take its place on the page.

    I can do the visible/invisible bit but the problem at the moment is
    that each <divoccupies its own space and successive blocks, when
    they are made visible, move along the page.

    Cheers

    Geoff
  • Ben C

    #2
    Re: &lt;div&gt; contents in same position?

    On 2008-04-16, Geoff Cox <gcox@freeuk.no tcomwrote:
    Hello,
    >
    I have a series of <divblocks which I want to appear in the same
    position on the page, one after the other.
    >
    Can I do this with css/javascript?
    >
    At the moment one <divblock is visible and the other 3 invisible.
    Once the first block has been used I want it to become invisible and
    the second block to become visible and take its place on the page.
    >
    I can do the visible/invisible bit but the problem at the moment is
    that each <divoccupies its own space and successive blocks, when
    they are made visible, move along the page.
    There are various ways to do this but one is to switch them between
    display:block and display:none rather than between visibility:visi ble
    and visibility:hidd en.

    If something's display:none then it's as though it weren't there at all.

    Comment

    • Geoff Cox

      #3
      Re: &lt;div&gt; contents in same position?

      On Wed, 16 Apr 2008 02:25:17 -0500, Ben C <spamspam@spam. eggswrote:

      >I can do the visible/invisible bit but the problem at the moment is
      >that each <divoccupies its own space and successive blocks, when
      >they are made visible, move along the page.
      >
      >There are various ways to do this but one is to switch them between
      >display:bloc k and display:none rather than between visibility:visi ble
      >and visibility:hidd en.
      >
      >If something's display:none then it's as though it weren't there at all.
      Thanks a lot! Works as wished for.

      Cheers

      Geoff

      Comment

      Working...