CSS + HTML Trouble with overall_header.tpl

Help with html/xhtml, css, javascript and other related topics.

Moderator: Moderators

CSS + HTML Trouble with overall_header.tpl

Postby webnoobie on Tue Dec 06, 2005 5:40 pm

Greetings,

Ok. Im running into some errors with my coding, but my coding seems to be fine, its the output. My green buttons / mouseover functions for the header part of my website are not being aligned right or are not aligning correctly. I have six buttons, and one always drops down, but the others are spread apart. And I need to get them all close together and all six on the same horizontal line type thing. Also, this is a new type of project Im working on and when I built / designed the template, it worked fine with just one HTML file, but now since I have broken it into overall_header.tpl, index_body.tpl and now a overall_footer.tpl it causes errors. See image for example of what I mean, and the coding I have used for the overall_header.tpl file.


Image

Code: Select all
<html >
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <title>The Tech Base :: PC, Programming and Design Support</title>
   <link href="templates/style.css" rel="stylesheet" type="text/css">
   <script language="JavaScript" type="text/JavaScript">
   <!--
   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>
</head>

<body onLoad="MM_preloadImages('templates/images/m1r.jpg','templates/images/m2r.jpg','templates/images/m3r.jpg','templates/images/m4r.jpg','templates/images/m5r.jpg','templates/images/m6r.jpg')">
<div id="wrap">
   <div id="top">
      <img src="templates/images/spacer.gif" height="38" width="1"><br>
      <img src="templates/images/spacer.gif" width="25" height="1" align="absmiddle">
      <img src="templates/images/logo.jpg" align="absmiddle">
      <img src="templates/images/spacer.gif" width="333" height="1">
      <a href="./index.php"><img src="templates/images/s1.jpg" border="0" align="absmiddle"></a>
      <img src="templates/images/spacer.gif" width="8" height="1"><a href="#"><img src="templates/images/s2.jpg" border="0" align="absmiddle"></a>
      <img src="templates/images/spacer.gif" width="8" height="1"><a href="#"><img src="templates/images/s3.jpg" border="0" align="absmiddle"></a><br>
      <img src="templates/images/spacer.gif" width="1" height="11"><br>
      <a href="./index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image49','','templates/images/m1r.jpg',1)"><img src="templates/images/m1.jpg" name="Image49" width="116" height="54" border="0"></a>
      <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image50','','templates/images/m2r.jpg',1)"><img src="templates/images/m2.jpg" name="Image50" width="111" height="54" border="0"></a>
      <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image51','','templates/images/m3r.jpg',1)"><img src="templates/images/m3.jpg" name="Image51" width="111" height="54" border="0"></a>
      <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image52','','templates/images/m4r.jpg',1)"><img src="templates/images/m4.jpg" name="Image52" width="111" height="54" border="0"></a>
      <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image53','','templates/images/m5r.jpg',1)"><img src="templates/images/m5.jpg" name="Image53" width="112" height="54" border="0"></a>
      <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image54','','templates/images/m6r.jpg',1)"><img src="templates/images/m6.jpg" name="Image54" width="115" height="54" border="0"></a>
      <br>
   </div>
   <div id="top_txt">
      <img src="templates/images/spacer.gif" width="1" height="8"><br>
      <img src="templates/images/spacer.gif" width="19" height="1">
      <a href="#" class="top">www.thetechbase.com</a>
      <img src="templates/images/spacer.gif" width="295" height="1">
      <span class="top">Current Date: December 05, 2005</span>
   </div>
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby DoubleJ on Tue Dec 06, 2005 6:44 pm

try this:
Code: Select all
#top img { margin: 0px; padding: 0px; }


And since you are using divs -> set the doctype to xhtml rather then just html if you had not done so before.
It never hurts to help.....
[ My phpBB Mods and Styles ]
My Mod: [ Simple Shoutbox Mod ]
[ DoubleJWeb ] [ Get Opera ]
User avatar
DoubleJ
Moderator
Moderator
 
Posts: 716
Joined: Sat Jan 22, 2005 9:58 pm
Location: DoubleJWeb.Net

Postby webnoobie on Tue Dec 06, 2005 8:09 pm

Greetings,

Ok. I will try that DoubleJ, but does anyone else know? It works fine in a normal HTML file, but when I break it into overall_header.tpl, index_body.tpl, and overall_footer.tpl it doesnt. :cry: Does anyone else know something that I could try? Thanks! :D
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby webnoobie on Wed Dec 07, 2005 12:12 am

Greetings,

When I posted my first post in this topic, I was at school where they only have IE. But now when I got home, I tried Mozilla FireFox and the template is perfectly fine. Do you know why?
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby webnoobie on Wed Dec 07, 2005 12:41 am

Greetings, if this can help more, here the CSS for the DIV where the images / nav images are:

Code: Select all
#top {margin:0px auto 0px auto;
width:676px;
height:156px;
text-align:left;
display:table;
padding:0px;
}
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby webnoobie on Wed Dec 07, 2005 12:46 am

And DoubleJ I have already tried that!
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby webnoobie on Thu Dec 08, 2005 5:04 pm

Greetings,

Can someone please help me here ASAP. I need to find a solution as soon as possible and I have tried everything that I know of. But I know that some other people here are more experienced and great coders / designers here.
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby DoubleJ on Thu Dec 08, 2005 9:25 pm

dont you have some kind of live demo so we can see what is going wrong cause I can't tell what happens by only seeing source and a screenshot.

Also DON'T bump your topic every 3 minutes. The edit key is NOT a button that was invented for no purpose at all, it has a purpose and use it the way it is ment rather then replying all the time.
It never hurts to help.....
[ My phpBB Mods and Styles ]
My Mod: [ Simple Shoutbox Mod ]
[ DoubleJWeb ] [ Get Opera ]
User avatar
DoubleJ
Moderator
Moderator
 
Posts: 716
Joined: Sat Jan 22, 2005 9:58 pm
Location: DoubleJWeb.Net

Postby webnoobie on Thu Dec 08, 2005 9:28 pm

Hey,

Ok.

For new project and the one causing errors go to:
http://dev.thetechbase.com/tb_new/index.php

For the one that is just plain HTML with no errors:
http://dev.thetechbase.com/templates/ttb/index.html

Please help ! :D Thanks
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby DoubleJ on Thu Dec 08, 2005 9:34 pm

Try putting the menu code on 1 line just like in the working version.
I also had a problem that there was a space underneath images in a menu list but when I put them in 1 line in the file the space was gone.
It never hurts to help.....
[ My phpBB Mods and Styles ]
My Mod: [ Simple Shoutbox Mod ]
[ DoubleJWeb ] [ Get Opera ]
User avatar
DoubleJ
Moderator
Moderator
 
Posts: 716
Joined: Sat Jan 22, 2005 9:58 pm
Location: DoubleJWeb.Net

Postby webnoobie on Fri Dec 09, 2005 5:23 pm

Hey,

Thanks DoubleJ. I will try asap! :D
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby webnoobie on Fri Dec 09, 2005 5:35 pm

Greetings,

Thank-you so MUCH DoubleJ! It worked like a charm! :D:D:D:D
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer


Return to (X)HTML Coding

Who is online

Users browsing this forum: No registered users and 0 guests

cron