So far I have this for javascript which works great:
This is the div tag I'm trying to manipulate
All I want to do is change the left:129 to left:26 if the screen resolution is detected to be 800xsomething
I've tried permutations on a bunch of stuff that doesn't work - like this:
I can't even get my browser to recognize my layer - much less move it - I keep getting an error when I refresh the screen. Now I'm just plain frustrated. Can someone point me in the right direction?
I know there's been a lot of postings on this topic, but I'm still unsure of the best way to proceed. It doesn't seem like a hard thing to do.
I am a nobody, and nobody is perfect; therefore, I am perfect.
Code:
<script language="JavaScript" TYPE="text/javascript">
function rightSize()
{
var screenWidth = window.screen.width;
switch (screenWidth)
{
case 1024:
window.document.write ('ITS 1024!');
break;
case 800:
window.document.write ('ITS 800!');
break;
default:
window.document.write('HELLO THERE');
break;
}
}
// call the above function
rightSize();
</script>
This is the div tag I'm trying to manipulate
Code:
<div id=layWording style="position:absolute; left:129px; top:208px; width:533px; height:258px; z-index:11">
All I want to do is change the left:129 to left:26 if the screen resolution is detected to be 800xsomething
I've tried permutations on a bunch of stuff that doesn't work - like this:
Code:
var element
element=window.document.getElementById("layWording");
element.style.left=26+"px";
element.style.left=26;
element=window.document.all[layWording]
I can't even get my browser to recognize my layer - much less move it - I keep getting an error when I refresh the screen. Now I'm just plain frustrated. Can someone point me in the right direction?
I know there's been a lot of postings on this topic, but I'm still unsure of the best way to proceed. It doesn't seem like a hard thing to do.
I am a nobody, and nobody is perfect; therefore, I am perfect.