Hi - I've just started playing with layers - I have a number of layers nested within a container layer - but how do I center the container layer using align="Center" seems to have no effect. Thanks
Layers use the style attribute where you have to define what position you want the layers to appear in...
Similarly you can use JS to manipulate that...if you just wanna center the layers then do this (I do this on my site, someone here at tek-tips helped me out with this when I first started here):
<SCRIPT LANGUAGE="JavaScript" SRC="rightclick.js"></SCRIPT>
<script languge="Javascript" src="searchscript.js"></script>
<script>
function moveDivs(){
if (screen.width>=1024){
for (i=0;i<document.all.length;i++){
if (document.all.tagName.toLowerCase()=='div' && document.all.style.position!=null && document.all.style.left!=null)
document.all.style.pixelLeft+=100;
}
}
}
onload=moveDivs;
</script>
Then call all your <div> like this (this is one example of how I move my <div> on my site):
<div id="interface" style="position:absolute; width:731px; height:256px; z-index:1; left: 27px; top: 20px">
<img src="interface1_2.jpg" width="725" height="632" border="0" usemap="#Map">
<div align="center"><font face="Georgia, Times New Roman, Times, serif" size="2">This
site is intended for Internet Explorer 5.0+ and NetScape 6.0+...</font>
</div>
</div>
What this does is in higher resolution it moves that div to the center of the page...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.