keep successive text/images in same place on the page?

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

    keep successive text/images in same place on the page?

    Hello,

    I have the code below in which the play1.gif image is visible and when
    the associated sound has been played the the 2 images same1.gif and
    different1.gif appear. Once one of these has been selected the 3
    images and the title disappear and the second title and play image
    appear etc.

    Problem is that for sucessive Test titles the titles and the
    associated images move down the page. I am using the following css.

    ..hiddenDiv2 {
    display: none;
    }
    ..visibleDiv2{
    display: block;
    }

    Is it possible to keep the successive titles and images in the same
    place on the page?

    Cheers

    Geoff



    <div id="test1" class="visibleD iv2">
    <h3>Test 1:</h3>
    <IMG alt="image" id="a10" src="../assets/images/play1.gif"
    onclick="musicS elect(this);">
    </div>
    <div id="test11" class="hiddenDi v2">
    <IMG alt="image" id="a11" src="../assets/images/same1.gif"
    onclick="checkT hisFirst(this); ">
    <IMG alt="image" id="a12" src="../assets/images/different1.gif"
    onclick="checkT hisSecond(this) ;">
    </div>

    <div id="test2" class="hiddenDi v2">
    <h3><em>Test 2:</em></h3>
    <IMG alt="image" id="a20" src="../assets/images/play1.gif"
    onclick="musicS elect(this);">
    </div>
    <div id="test21" class="hiddenDi v2">
    <IMG alt="image" id="a21" src="../assets/images/same1.gif"
    onclick="checkT hisFirst(this); ">
    <IMG alt="image" id="a22" src="../assets/images/different1.gif"
    onclick="checkT hisSecond(this) ;">
    </div>
  • Ben C

    #2
    Re: keep successive text/images in same place on the page?

    On 2008-04-25, Geoff Cox <gcox@freeuk.no tcomwrote:
    Hello,
    >
    I have the code below in which the play1.gif image is visible and when
    the associated sound has been played the the 2 images same1.gif and
    different1.gif appear. Once one of these has been selected the 3
    images and the title disappear and the second title and play image
    appear etc.
    >
    Problem is that for sucessive Test titles the titles and the
    associated images move down the page. I am using the following css.
    >
    .hiddenDiv2 {
    display: none;
    }
    .visibleDiv2{
    display: block;
    }
    >
    Is it possible to keep the successive titles and images in the same
    place on the page?
    It sounds like you want to use

    ..hiddenDiv2 {
    visibility: hidden;
    }
    ..visibleDiv2{
    visible: visible;
    }

    instead. Display: none makes the element disappear, which alters the
    position of other elements. Visibility: hidden just makes it invisible.

    Comment

    • Geoff Cox

      #3
      Re: keep successive text/images in same place on the page?

      On Fri, 25 Apr 2008 16:38:00 -0500, Ben C <spamspam@spam. eggswrote:
      >On 2008-04-25, Geoff Cox <gcox@freeuk.no tcomwrote:
      >Hello,
      >>
      >I have the code below in which the play1.gif image is visible and when
      >the associated sound has been played the the 2 images same1.gif and
      >different1.g if appear. Once one of these has been selected the 3
      >images and the title disappear and the second title and play image
      >appear etc.
      >>
      >Problem is that for sucessive Test titles the titles and the
      >associated images move down the page. I am using the following css.
      >>
      >.hiddenDiv2 {
      >display: none;
      >}
      >.visibleDiv2 {
      >display: block;
      >}
      >>
      >Is it possible to keep the successive titles and images in the same
      >place on the page?
      >
      >It sounds like you want to use
      >
      >.hiddenDiv2 {
      visibility: hidden;
      >}
      >.visibleDiv2 {
      visible: visible;
      >}
      Ben,

      the snag with above is that the successive tests and images move down
      the page - the block idea keeps them in the same place ...

      Cheers

      Geoff


      >instead. Display: none makes the element disappear, which alters the
      >position of other elements. Visibility: hidden just makes it invisible.

      Comment

      • Geoff Cox

        #4
        Re: keep successive text/images in same place on the page?

        On Fri, 25 Apr 2008 16:38:00 -0500, Ben C <spamspam@spam. eggswrote:
        >On 2008-04-25, Geoff Cox <gcox@freeuk.no tcomwrote:
        >Hello,
        >>
        >I have the code below in which the play1.gif image is visible and when
        >the associated sound has been played the the 2 images same1.gif and
        >different1.g if appear. Once one of these has been selected the 3
        >images and the title disappear and the second title and play image
        >appear etc.
        >>
        >Problem is that for sucessive Test titles the titles and the
        >associated images move down the page. I am using the following css.
        >>
        >.hiddenDiv2 {
        >display: none;
        >}
        >.visibleDiv2 {
        >display: block;
        >}
        >>
        >Is it possible to keep the successive titles and images in the same
        >place on the page?
        >
        >It sounds like you want to use
        >
        >.hiddenDiv2 {
        visibility: hidden;
        >}
        >.visibleDiv2 {
        visible: visible;
        >}
        >
        Ben,

        In fact contrary to my other reply it seems that it is
        postion:absolut e that keeps successive titles and images in the same
        place ...?

        Cheers

        Geoff

        >instead. Display: none makes the element disappear, which alters the
        >position of other elements. Visibility: hidden just makes it invisible.

        Comment

        • dorayme

          #5
          Re: keep successive text/images in same place on the page?

          In article <69m514tsriaqub 03jaup70mtonv46 lie6q@4ax.com>,
          Geoff Cox <gcox@freeuk.no tcomwrote:
          Ben,
          >
          In fact contrary to my other reply it seems that it is
          postion:absolut e that keeps successive titles and images in the same
          place ...?
          position: absolute has a bad habit of doing this sort of thing.

          --
          dorayme

          Comment

          • Geoff Cox

            #6
            Re: keep successive text/images in same place on the page?

            On Sat, 26 Apr 2008 17:53:25 +1000, dorayme
            <doraymeRidThis @optusnet.com.a uwrote:
            >In article <69m514tsriaqub 03jaup70mtonv46 lie6q@4ax.com>,
            Geoff Cox <gcox@freeuk.no tcomwrote:
            >
            >Ben,
            >>
            >In fact contrary to my other reply it seems that it is
            >postion:absolu te that keeps successive titles and images in the same
            >place ...?
            >
            >position: absolute has a bad habit of doing this sort of thing.
            Yes - but that's what I want! Except that with position absolute the
            titles and images can be on the top of the text in some pages ...

            Cheers

            Geoff

            Comment

            • dorayme

              #7
              Re: keep successive text/images in same place on the page?

              In article <eco514lul30t33 n81e4s22v6b1vb9 s4rva@4ax.com>,
              Geoff Cox <gcox@freeuk.no tcomwrote:
              On Sat, 26 Apr 2008 17:53:25 +1000, dorayme
              <doraymeRidThis @optusnet.com.a uwrote:
              >
              In article <69m514tsriaqub 03jaup70mtonv46 lie6q@4ax.com>,
              Geoff Cox <gcox@freeuk.no tcomwrote:
              Ben,
              >
              In fact contrary to my other reply it seems that it is
              postion:absolut e that keeps successive titles and images in the same
              place ...?
              position: absolute has a bad habit of doing this sort of thing.
              >
              Yes - but that's what I want!
              I suspected you did! Let me add <gto help along here.

              --
              dorayme

              Comment

              • Geoff Cox

                #8
                Re: keep successive text/images in same place on the page?

                On Sat, 26 Apr 2008 18:19:09 +1000, dorayme
                <doraymeRidThis @optusnet.com.a uwrote:
                >In article <eco514lul30t33 n81e4s22v6b1vb9 s4rva@4ax.com>,
                Geoff Cox <gcox@freeuk.no tcomwrote:
                >
                >On Sat, 26 Apr 2008 17:53:25 +1000, dorayme
                ><doraymeRidThi s@optusnet.com. auwrote:
                >>
                >In article <69m514tsriaqub 03jaup70mtonv46 lie6q@4ax.com>,
                Geoff Cox <gcox@freeuk.no tcomwrote:
                >
                >Ben,
                >>
                >In fact contrary to my other reply it seems that it is
                >postion:absolu te that keeps successive titles and images in the same
                >place ...?
                >
                >position: absolute has a bad habit of doing this sort of thing.
                >>
                >Yes - but that's what I want!
                >
                >I suspected you did! Let me add <gto help along here.
                agh!!!

                Comment

                Working...