473,394 Members | 2,160 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,394 software developers and data experts.

Layer positioning within a table

Hello,

I'm new to style sheets and have been fighting with browser
compatibility for two days. I'm developing a image selection page
(similar to Ebay where the visitor can select and enlarge 1-6
thumbnail pictures) that will possibly be displaying different sized
images within a table. The following code almost :) works correctly in
I.E. (I'd like the images centered in the table vertically and
horizontally) but does not work in Netscape 4.x. It seems that N4 does
not like the positioning within the table. There must be some tricks
to get this to work. Any ideas?? Also if you have any idea's with the
vertical and horizontal centering issue in I.E. that would be great.

Thanks, Chris

Code:

<html>
<head>
<script language="JavaScript">
<!--

function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW ||
innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7_ShowPic(a,b) { //v2.0 by PVII
var g,gg,d,dd,ic,im;if((g=MM_findObj(b))!=null){
if(!document.P7ShowPic){document.P7ShowPic=true;}e lse{
if((d=MM_findObj(document.P7SPlay))!=null){
dd=(document.layers)?d:d.style;dd.visibility="hidd en";}}
document.P7SPlay=b;gg=(document.layers)?g:g.style; im=b+"im";
if((ic=MM_findObj(im))!=null){ic.src=a;gg.visibili ty="visible";}}
}

//-->
</script>
</head>

<body>
<br />

<p align="center"><a href="#"
onclick="P7_ShowPic('1.jpg', 'P7ShowPL1');return false">dork</a> |
<a href="#"
onclick="P7_ShowPic('2.jpg', 'P7ShowPL2');return
false">dork1</a></p>

<table width="800" border="1" align="center">
<tr>
<td align="center" width="800">
<div style="position: relative; text-align:center;">
<div id="P7ShowPL1"
style="Z-INDEX: 1; VISIBILITY:hidden; position:absolute;
text-align:center;">
<img src="1.jpg" name="P7ShowPL1im" />
</div>

<div id="P7ShowPL2"
style="Z-INDEX: 1; VISIBILITY:hidden; position:absolute;
text-align:center;">
<img src="2.jpg" name="P7ShowPL2im" />
</div>
</div>
</td>

<td align="center"><img src="spacer.jpg" height="400"
width="1" /></td>
</tr>
</table>

</body>
</html>
Jul 21 '05 #1
1 4175
In comp.infosystems.www.authoring.stylesheets Chris McGarry said:
Hello,


g'day

What is the accepted way to share a message across multiple newsgroups?
http://smjg.port5.com/faqs/usenet/xpost.html

--
v o i c e s
Jul 21 '05 #2

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

Similar topics

1
by: Question | last post by:
I am making a custom small menu which is most basic. Problem is that I can't make the first step work for some reason. I have an image to the left of where would be the layer positioned. This...
1
by: PAD | last post by:
I have written a javascript routine that populates a parent document with a series of <iframe>s. Each <iframe> receives its contents from a series of separate smaller HTML files. Of course my NN...
0
by: Wally Sanford | last post by:
I have a layer in a table at http://home.earthlink.net/~wallysanford/ that displays about how I'd like in IExplorer but is several pixels low in Netscape 7.x/6.x, Mozilla, Galeon, and Konqueror. ...
9
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. ...
2
by: Stephen Weatherly | last post by:
Could anyone please help me with a problem I am having with my table widths??? If I have 2 images within a td tag, but using CSS relative positioning I position one over the top of the second (I...
10
by: Peter Altenberg | last post by:
is there some way to make the positioning of a layer (div) so that it is centered in the window. so even when you resize the window it stays centered? i would like to do this with CSS just like you...
87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
2
by: Rob R. Ainscough | last post by:
I'm slowly (very slowly) working my way thru the bizarre and sadistic world of control positioning in MultiViews (ASP 2.0). I came across this to help me explain (or attempt to anyway) why my web...
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.