473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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="visibleDiv2">
<h3>Test 1:</h3>
<IMG alt="image" id="a10" src="../assets/images/play1.gif"
onclick="musicSelect(this);">
</div>
<div id="test11" class="hiddenDiv2">
<IMG alt="image" id="a11" src="../assets/images/same1.gif"
onclick="checkThisFirst(this);">
<IMG alt="image" id="a12" src="../assets/images/different1.gif"
onclick="checkThisSecond(this);">
</div>

<div id="test2" class="hiddenDiv2">
<h3><em>Test 2:</em></h3>
<IMG alt="image" id="a20" src="../assets/images/play1.gif"
onclick="musicSelect(this);">
</div>
<div id="test21" class="hiddenDiv2">
<IMG alt="image" id="a21" src="../assets/images/same1.gif"
onclick="checkThisFirst(this);">
<IMG alt="image" id="a22" src="../assets/images/different1.gif"
onclick="checkThisSecond(this);">
</div>
Jun 27 '08 #1
7 4143
On 2008-04-25, Geoff Cox <gc**@freeuk.notcomwrote:
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.
Jun 27 '08 #2
On Fri, 25 Apr 2008 16:38:00 -0500, Ben C <sp******@spam.eggswrote:
>On 2008-04-25, Geoff Cox <gc**@freeuk.notcomwrote:
>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;
}
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.
Jun 27 '08 #3
On Fri, 25 Apr 2008 16:38:00 -0500, Ben C <sp******@spam.eggswrote:
>On 2008-04-25, Geoff Cox <gc**@freeuk.notcomwrote:
>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;
}
Ben,

In fact contrary to my other reply it seems that it is
postion:absolute 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.
Jun 27 '08 #4
In article <69********************************@4ax.com>,
Geoff Cox <gc**@freeuk.notcomwrote:
Ben,

In fact contrary to my other reply it seems that it is
postion:absolute that keeps successive titles and images in the same
place ...?
position: absolute has a bad habit of doing this sort of thing.

--
dorayme
Jun 27 '08 #5
On Sat, 26 Apr 2008 17:53:25 +1000, dorayme
<do************@optusnet.com.auwrote:
>In article <69********************************@4ax.com>,
Geoff Cox <gc**@freeuk.notcomwrote:
>Ben,

In fact contrary to my other reply it seems that it is
postion:absolute 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
Jun 27 '08 #6
In article <ec********************************@4ax.com>,
Geoff Cox <gc**@freeuk.notcomwrote:
On Sat, 26 Apr 2008 17:53:25 +1000, dorayme
<do************@optusnet.com.auwrote:
In article <69********************************@4ax.com>,
Geoff Cox <gc**@freeuk.notcomwrote:
Ben,

In fact contrary to my other reply it seems that it is
postion:absolute 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
Jun 27 '08 #7
On Sat, 26 Apr 2008 18:19:09 +1000, dorayme
<do************@optusnet.com.auwrote:
>In article <ec********************************@4ax.com>,
Geoff Cox <gc**@freeuk.notcomwrote:
>On Sat, 26 Apr 2008 17:53:25 +1000, dorayme
<do************@optusnet.com.auwrote:
>In article <69********************************@4ax.com>,
Geoff Cox <gc**@freeuk.notcomwrote:

Ben,

In fact contrary to my other reply it seems that it is
postion:absolute 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!!!
Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Norman Peelman | last post by:
I have a script that outputs images directly using the 'image' functions. I have googled quite a bit but cannot seem to find the correct method of sending headers to keep the images from being...
35
by: .:mmac:. | last post by:
I have a bunch of files (Playlist files for media player) and I am trying to create an automatically generated web page that includes the last 20 or 30 of these files. The files are created every...
8
by: Chris Beall | last post by:
I'm struggling with how to handle, on a web page, images that contain text that the user must be able to read. Examples: tombstone photos, photos or scans of historic documents (handwritten or...
16
by: Woodmon | last post by:
I want to flow text in an "irregular" column on the left and place a large image at the top of an "irregular" column to the right. Then after the bottom of the large image I want the text column on...
2
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at...
0
JimWu
by: JimWu | last post by:
I have some problems in my code. The stutiation illustrate as the followsing statement. I use two pages, one, named "upload.aspx", is including several general html input tag, whose type are...
4
osward
by: osward | last post by:
I had made a table colum sortable and paging the table, following are the code // Display Event List echo "<center>"._EVENTLIST."</center><br>"; $now = Date(Y-m-d); // sort table...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.