473,782 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript">
<!--

function MM_reloadPage(i nit) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Net scape")&&(parse Int(appVersion) ==4)) {
document.MM_pgW =innerWidth; document.MM_pgH =innerHeight;
onresize=MM_rel oadPage; }}
else if (innerWidth!=do cument.MM_pgW ||
innerHeight!=do cument.MM_pgH) location.reload ();
}
MM_reloadPage(t rue);

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf ("?"))>0&&paren t.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.fo rms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.l ayers&&i<d.laye rs.length;i++)
x=MM_findObj(n, d.layers[i].document);
if(!x && d.getElementByI d) x=d.getElementB yId(n); return x;
}

function P7_ShowPic(a,b) { //v2.0 by PVII
var g,gg,d,dd,ic,im ;if((g=MM_findO bj(b))!=null){
if(!document.P7 ShowPic){docume nt.P7ShowPic=tr ue;}else{
if((d=MM_findOb j(document.P7SP lay))!=null){
dd=(document.la yers)?d:d.style ;dd.visibility= "hidden";}}
document.P7SPla y=b;gg=(documen t.layers)?g:g.s tyle;im=b+"im";
if((ic=MM_findO bj(im))!=null){ ic.src=a;gg.vis ibility="visibl e";}}
}

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

<body>
<br />

<p align="center"> <a href="#"
onclick="P7_Sho wPic('1.jpg', 'P7ShowPL1');re turn false">dork</a> |
<a href="#"
onclick="P7_Sho wPic('2.jpg', 'P7ShowPL2');re turn
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:hidd en; position:absolu te;
text-align:center;">
<img src="1.jpg" name="P7ShowPL1 im" />
</div>

<div id="P7ShowPL2"
style="Z-INDEX: 1; VISIBILITY:hidd en; position:absolu te;
text-align:center;">
<img src="2.jpg" name="P7ShowPL2 im" />
</div>
</div>
</td>

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

</body>
</html>
Jul 21 '05 #1
1 4199
In comp.infosystem s.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
1489
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 layer must be 15 pixels to the left of that image. Since my main page is centered in the browser's window, the pixels to the left of my image are different for each browser and also depends on how wide the browser window is.
1
1941
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 4.8 browser doesn't deal well with the <iframe> so I wrapped the code that generates the <iframe> in <ilayer> tags. NN now recognizes the contents. However within each of the 'content' files I have another javascript routine that basically...
0
1898
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. I suspect the answer may be CSS, which I need to learn, but can anyone suggest what else might solve this in the interim? I've fiddled with z-layers and am looking at what Fox said at...
9
32064
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. However, there are images that I used absolute positioning in order to place them in the appropriate location on my page. When I do a browser resize, these images do not move (obviously). However, the rest of my content is auto centered as...
2
7750
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 am placing a transparent gif over the top of a normal gif) then the width of my table is large enough to accommodate both images side by side My browsers (both IE ad Firefox) do not appear take into account the relative positioning of my...
10
8795
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 can with tables. thanks, ~peter
87
9630
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: absolute;top:68px; left:563px; width:640px;height:480px;"> <IMG src="ReportImageBox_12.54.52.png" width=640 height=480></IMG>
2
2511
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 page controls were all over the place. "Ironically, absolute positioning is relative. Yes, you read that right. An absolutely positioned element is positioned relative to another element, called the containing block. Here comes the definition...
2
16419
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 to overlap correctly. You can see it on this page: www.creativekaysjewelry.com The images overlap exactly how I wanted and in the right position
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.