Okay, i tried to do a position relative here, but it blew itself up! What is going on!
<!-- m --><a class="postlink" href="http://sigmaseven.net">http://sigmaseven.net</a><!-- m -->
here is the code:
<?php
//HERE IS INCLUDE**********************************************************
//HERE IS INCLUDE**********************************************************
//HERE IS INCLUDE**********************************************************
include("variable.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<?php
function truncate($FltValue, $IntPrecision)
/* function: truncate
* Input Parameters
* $FltValue -> value to truncate
* $IntPrecision -> how many decimal to use
* Out Put
* Value rounded with $IntPrecision decimal places
* Objectives
* Round a number to $IntPrecision.
* 123.99999 -> 123.99 1234.0099 -> 1234.00
*
*/
{
return floor($FltValue * pow(10 , $IntPrecision)) / (pow(10,$IntPrecision));} /* truncate */
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #cccccc;
position: relative;
margin: 0.5em auto;
width: 800px;
}
body,td,th {
color: #CCCCCC;
font-family: Franklin Gothic Medium, Arial, Helvetica, sans-serif;
}
.style5 {
font-size: 18;
font-weight: bold;
}
.style9 {font-size: 14px}
.style10 {font-size: 18}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
-->
</style>
<script language="JavaScript" type="text/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);
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
function Change(number) {
if (number==1) {
document.getElementById('box1').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEwhite.jpg"
}
if (number==2) {
document.getElementById('box2').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEgrey.jpg"
}
if (number==3) {
document.getElementById('box3').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEgreen.jpg"
}
if (number==4) {
document.getElementById('box4').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEred_r1_c1.jpg"
}
}
function Changeback() {
document.getElementById('box1').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('box2').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('box3').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('box4').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEbottomleft_r1_c1.jpg"
}
</script>
<? include('Nav.htm'); ?>
<div id="Layer35" style="position:relative; left:224px; top:24px; width:589px; height:6px; z-index:1;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/orange_h-bar_small.gif" width="589" height="24"></div>
<div id="Layer34" style="position:relative; left:224px; top:0px; width:589px; height:24px; z-index: 2;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/smalltopbar.gif" width="589" height="24"></div>
<div id="Layer6" style="position:relative; left:486px; top:264px; width:0px; height:1px; z-index:6"></div>
<div id="Layer15" style="position:relative; left:252px; top:62px; width:28px; height:28px; z-index:41"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/READY.gif" width="213" height="70"></div>
<div id="Layer16" style="position:relative; left:249px; top:61px; width:219px; height:225px; z-index:1; background-color: #333333; layer-background-color: #333333; border: 1px none #000000;"></div>
<div id="Layer17" style="position:relative; left:252px; top:134px; width:29px; height:34px; z-index:43"><a href=http://www.webdeveloper.com/forum/archive/index.php/"gamingfinal.php"><img src="../Images/Otherpics/BLOCK.gif" width="35" height="35" border="0" id="box1"></a></div>
<div id="Layer17" style="position:relative; left:252px; top:172px; width:29px; height:34px; z-index:43"><img id="box2" src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif" width="35" height="35"></div>
<div id="Layer17" style="position:relative; left:252px; top:210px; width:29px; height:34px; z-index:43"><img id="box3" src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif" width="35" height="35"></div>
<div id="Layer8" style="position:relative; left:328px; top:318px; width:214px; height:120px; z-index:37"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/dynamohosting.gif" width="308" height="50"></div>
<div id="Layer17" style="position:relative; left:252px; top:248px; width:29px; height:34px; z-index:43"><img id="box4" src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif" width="35" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:134px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_gaming.gif" width="178" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:172px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_enthusiast.gif" width="178" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:210px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_budget.gif" width="178" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:248px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_hed.gif" width="178" height="35"></div>
<div id="Layer1" style="position:relative; left:468px; top:61px; width:76px; height:225px; z-index:46"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border3_window_hes.jpg" width="333" height="225"></div>
</body>
</html>
thanks in advance!Originally posted by theuedimaster
it blew itself up!
lol, computers usually do what you tell them to.
Does the <? include('Nav.htm'); ?> contain the open body tag (<body>)?nm, i got it. The manual i was looking at said to position body elements as relative too, but they are supposed to be absolute. Just to be sure, does it work on your comp too now?not sure about your absolute statement, I use:
body {
position: relative;
margin: 2em auto;
width: 760px;
background: #F7EFDE;
}
all the time, I wonder if you don't have some other elements a few pixels off?
check out Vladdy's info page (<!-- m --><a class="postlink" href="http://www.vladdy.net/Demos/htmlandbodystyling.html">http://www.vladdy.net/Demos/htmlandbodystyling.html</a><!-- m -->)
<!-- m --><a class="postlink" href="http://sigmaseven.net">http://sigmaseven.net</a><!-- m -->
here is the code:
<?php
//HERE IS INCLUDE**********************************************************
//HERE IS INCLUDE**********************************************************
//HERE IS INCLUDE**********************************************************
include("variable.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<?php
function truncate($FltValue, $IntPrecision)
/* function: truncate
* Input Parameters
* $FltValue -> value to truncate
* $IntPrecision -> how many decimal to use
* Out Put
* Value rounded with $IntPrecision decimal places
* Objectives
* Round a number to $IntPrecision.
* 123.99999 -> 123.99 1234.0099 -> 1234.00
*
*/
{
return floor($FltValue * pow(10 , $IntPrecision)) / (pow(10,$IntPrecision));} /* truncate */
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #cccccc;
position: relative;
margin: 0.5em auto;
width: 800px;
}
body,td,th {
color: #CCCCCC;
font-family: Franklin Gothic Medium, Arial, Helvetica, sans-serif;
}
.style5 {
font-size: 18;
font-weight: bold;
}
.style9 {font-size: 14px}
.style10 {font-size: 18}
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
-->
</style>
<script language="JavaScript" type="text/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);
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
function Change(number) {
if (number==1) {
document.getElementById('box1').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEwhite.jpg"
}
if (number==2) {
document.getElementById('box2').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEgrey.jpg"
}
if (number==3) {
document.getElementById('box3').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEgreen.jpg"
}
if (number==4) {
document.getElementById('box4').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCKclick.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEred_r1_c1.jpg"
}
}
function Changeback() {
document.getElementById('box1').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('box2').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('box3').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('box4').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif"
document.getElementById('bubbles').src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/PORTHOLEbottomleft_r1_c1.jpg"
}
</script>
<? include('Nav.htm'); ?>
<div id="Layer35" style="position:relative; left:224px; top:24px; width:589px; height:6px; z-index:1;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/orange_h-bar_small.gif" width="589" height="24"></div>
<div id="Layer34" style="position:relative; left:224px; top:0px; width:589px; height:24px; z-index: 2;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/smalltopbar.gif" width="589" height="24"></div>
<div id="Layer6" style="position:relative; left:486px; top:264px; width:0px; height:1px; z-index:6"></div>
<div id="Layer15" style="position:relative; left:252px; top:62px; width:28px; height:28px; z-index:41"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/READY.gif" width="213" height="70"></div>
<div id="Layer16" style="position:relative; left:249px; top:61px; width:219px; height:225px; z-index:1; background-color: #333333; layer-background-color: #333333; border: 1px none #000000;"></div>
<div id="Layer17" style="position:relative; left:252px; top:134px; width:29px; height:34px; z-index:43"><a href=http://www.webdeveloper.com/forum/archive/index.php/"gamingfinal.php"><img src="../Images/Otherpics/BLOCK.gif" width="35" height="35" border="0" id="box1"></a></div>
<div id="Layer17" style="position:relative; left:252px; top:172px; width:29px; height:34px; z-index:43"><img id="box2" src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif" width="35" height="35"></div>
<div id="Layer17" style="position:relative; left:252px; top:210px; width:29px; height:34px; z-index:43"><img id="box3" src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif" width="35" height="35"></div>
<div id="Layer8" style="position:relative; left:328px; top:318px; width:214px; height:120px; z-index:37"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/dynamohosting.gif" width="308" height="50"></div>
<div id="Layer17" style="position:relative; left:252px; top:248px; width:29px; height:34px; z-index:43"><img id="box4" src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/BLOCK.gif" width="35" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:134px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_gaming.gif" width="178" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:172px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_enthusiast.gif" width="178" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:210px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_budget.gif" width="178" height="35"></div>
<div id="Layer2" style="position:relative; left:287px; top:248px; width:178px; height:35px; z-index:45"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border2_homenav_hed.gif" width="178" height="35"></div>
<div id="Layer1" style="position:relative; left:468px; top:61px; width:76px; height:225px; z-index:46"><img src=http://www.webdeveloper.com/forum/archive/index.php/"../Images/Otherpics/border3_window_hes.jpg" width="333" height="225"></div>
</body>
</html>
thanks in advance!Originally posted by theuedimaster
it blew itself up!
lol, computers usually do what you tell them to.
Does the <? include('Nav.htm'); ?> contain the open body tag (<body>)?nm, i got it. The manual i was looking at said to position body elements as relative too, but they are supposed to be absolute. Just to be sure, does it work on your comp too now?not sure about your absolute statement, I use:
body {
position: relative;
margin: 2em auto;
width: 760px;
background: #F7EFDE;
}
all the time, I wonder if you don't have some other elements a few pixels off?
check out Vladdy's info page (<!-- m --><a class="postlink" href="http://www.vladdy.net/Demos/htmlandbodystyling.html">http://www.vladdy.net/Demos/htmlandbodystyling.html</a><!-- m -->)