It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Problems :|

Problems :|

Postby Tomi on Mon Apr 16, 2007 12:54 pm

I made a HTML page which doesnt look quite right in my browser. Below is the code and how it looks in the browser, after that is a picture of the original design i made. Problems include:

- Navigation images having gaps inbetween them
- Content areas expanding more than they should

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Knutsford High School - Graphics Department</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
   color: #FFFFFF;
   font-family: Arial, Helvetica, sans-serif;
   font-size: 12px;
}
.style2 {color: #FE0000}
a:link {
   color: #000000;
}
.style3 {
   font-size: 14px;
   font-family: Arial, Helvetica, sans-serif;
   color: #FFFFFF;
}
-->
</style></head>

<body onLoad="MM_preloadImages('../Images/Slices/Mouse_Over/O_Home.jpg','../Images/Slices/Mouse_Over/O_About.jpg','../Images/Slices/Mouse_Over/O_Gallery.jpg','../Images/Slices/Mouse_Over/O_Teachers.jpg','../Images/Slices/Mouse_Over/O_Facilities.jpg','../Images/Slices/Mouse_Over/O_Testimonials.jpg','../Images/Slices/Mouse_Over/O_Contact.jpg','../Images/Slices/Mouse_Over/O_Feedback.jpg')">
<table width="722"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="3"><img src="../Images/Slices/Headers/Header.jpg" width="577" height="75"><img src="../Images/Slices/Content_areas/Date.jpg" width="126" height="75"></td>
  </tr>
  <tr>
    <td height="43" colspan="3"><img src="../Images/Slices/Banner.jpg" width="703" height="107"></td>
  </tr>
  <tr>
    <td width="20%"><img src="../Images/Slices/Headers/Nav_header.jpg" width="168" height="25"></td>
    <td colspan="2"><img src="../Images/Slices/Headers/News_header.jpg" width="535" height="25"></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../Images/Slices/Mouse_Over/O_Home.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Home.jpg" name="Image16" width="168" height="24" border="0"></a></td>
    <td height="264" colspan="2" rowspan="11" background="../Images/Slices/Content_areas/News_content.jpg"><div id="Layer1" style="position:absolute; width:532px; height:213px; z-index:1; left: 184px; top: 226px;"><span class="style1">James Clarkes website is <span class="style2"><a href="http://www.jrcdesigns.co.uk" target="_blank">JrCDesigns</a>.</span></span></div></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image17','','../Images/Slices/Mouse_Over/O_About.jpg',1)"><img src="../Images/Slices/Navigation_buttons/About.jpg" name="Image17" width="168" height="24" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image18','','../Images/Slices/Mouse_Over/O_Gallery.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Gallery.jpg" name="Image18" width="168" height="24" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image19','','../Images/Slices/Mouse_Over/O_Teachers.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Teachers.jpg" name="Image19" width="168" height="24" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image20','','../Images/Slices/Mouse_Over/O_Facilities.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Facilities.jpg" name="Image20" width="168" height="24" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image21','','../Images/Slices/Mouse_Over/O_Testimonials.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Testimonials.jpg" name="Image21" width="168" height="24" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image22','','../Images/Slices/Mouse_Over/O_Contact.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Contact.jpg" name="Image22" width="168" height="24" border="0"></a></td>
  </tr>
  <tr>
    <td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image23','','../Images/Slices/Mouse_Over/O_Feedback.jpg',1)"><img src="../Images/Slices/Navigation_buttons/Feedback.jpg" name="Image23" width="168" height="26" border="0"></a></td>
  </tr>
  <tr>
    <td height="25"><img src="../Images/Slices/Headers/links_header.jpg" width="168" height="25"></td>
  </tr>
  <tr>
    <td><div id="Layer2" style="position:absolute; width:164px; height:162px; z-index:2; left: 12px; top: 479px;">
        <p class="style3"><a href="http://www.khs.co.uk" target="_blank">- KHS Homepage</a><br>
          <a href="http://www.khs.co.uk/artanddesign" target="_blank">- Art &amp; Design</a><br>
          - English <br>
          - Maths<br>
          - Science<br>
          - ITC<br>
          - PE<br>
          - Performing Arts<br>
          -
  Food Tech<br>
  - SFL<br>
  - Humanities
  </p>
    </div></td>
  </tr>
  <tr>
    <td background="../Images/Slices/Content_areas/Links_content.jpg">&nbsp;</td>
</tr>
  <tr>
    <td background="../Images/Slices/Content_areas/Links_content.jpg">&nbsp;</td>
    <td height="25" colspan="2"><img src="../Images/Slices/Headers/Projects_header.jpg" width="535" height="25"></td>
  </tr>
  <tr>
    <td background="../Images/Slices/Content_areas/Links_content.jpg">&nbsp;</td>
    <td height="165" colspan="2" background="../Images/Slices/Content_areas/Projects_content.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td height="22" colspan="3"><img src="../Images/Slices/Footer.jpg" width="703" height="22"></td>
  </tr>
</table>

<div align="center"></div>
</body>
</html>




This is what it looks like in the browser:
http://img263.imageshack.us/my.php?image=websitesw0.gif

This is an idea of how it should look:
http://img231.imageshack.us/my.php?image=layoutff7.jpg
User avatar
Tomi
500+ Club
 
Posts: 925
Joined: Mon Jun 26, 2006 6:51 pm
Location: Essex, England

Who is online

Users browsing this forum: No registered users and 6 guests