Help With code. [HTML&PHP]

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rifle
Forum Newbie
Posts: 4
Joined: Wed Nov 09, 2005 2:42 pm

Help With code. [HTML&PHP]

Post by rifle »

Introducing:

Hi, my name is Rifle (Jim Stukken), I am luring Php,Html. And making a website for my America's Army clan. But i am expiriancing some major problems.

The problems: As u can see there is a space "above" and "underneeth" the page witch should not be there. and where u can see the serverspec, there is a line.. underneeth the big frame. witch should also not be there. when i look at my code i can NOT find the problem. So please help me. (i was tinking to find a space somewhere or a foult (width or height) but i cant find it. Ty.

The img of the frame for the server webspec = "index_08.gif" so u should look @ "substyle1_8"

Url : http://www.xs.clanservers.com/website/

CSS StyleSheet :

Code: Select all

body {
background-color:#0e0e0e;
}

a:link {
	color:#CCCCCC;
	text-decoration:none;
	}
a:visited {
	color:#CCCCCC;
	text-decoration:none;
}
a:hover {
	color:#CCCCCC;
	text-decoration:none;
}
a:active {
	color:#CCCCCC;
	text-decoration:none;
}

#style1 (index image's) {
}
.substyle1_1{
background-image:url(images/Index_01.gif);
}
.substyle1_2{
background-image:url(images/Index_02.gif);
}
.substyle1_3{
background-image:url(images/Index_03.gif);
}
.substyle1_4{
background-image:url(images/Index_04.gif);
}
.substyle1_5{
background-image:url(images/Index_05.gif);
}
.substyle1_6{
background-image:url(images/Index_06.gif);
}
.substyle1_7{
background-image:url(images/Index_07.gif);
}
.substyle1_8{
color:#CCCCCC;
font-family:Arial;
font-size:10px;
background-image:url(images/Index_08.gif);
}
.substyle1_9{
background-image:url(images/Index_09.gif);
}
.substyle1_10{
background-image:url(images/Index_10.gif);
}
.substyle1_11{
background-image:url(images/Index_11.gif);
}
.substyle1_12{
background-image:url(images/Index_12.gif);
}
.substyle1_13{
background-image:url(images/Index_13.gif);
}
.substyle1_14{
background-image:url(images/Index_14.gif);
}
.substyle1_15{
background-image:url(images/Index_15.gif);
}
.substyle1_16{
background-image:url(images/Index_16.gif);
}
.substyle1_17{
color:#CCCCCC;
font-family:Arial;
font-size:10px;
background-image:url(images/Index_17.gif);
}
.substyle1_18{
background-image:url(images/Index_18.gif);
}
.substyle1_19{
background-image:url(images/Index_19.gif);
}
.substyle1_20{
background-image:url(images/Index_20.gif);
}
.substyle1_21{
background-image:url(images/Index_21.gif);
}
.substyle1_22{
background-image:url(images/Index_22.gif);
}
.substyle1_23{
color:#CCCCCC;
font-family:Arial;
font-size:10px;
background-image:url(images/Index_23.gif);
}
.substyle1_24{
background-image:url(images/Index_24.gif);
}
.substyle1_25{
background-image:url(images/Index_25.gif);
}
.substyle1_26{
background-image:url(images/Index_26.gif);
}
.substyle1_27{
background-image:url(images/Index_27.gif);
}
.substyle1_28{
background-image:url(images/Index_28.gif);
}
.substyle1_29{
background-image:url(images/Index_29.gif);
}
.substyle1_30{
background-image:url(images/Index_30.gif);
}
.substyle1_31{
background-image:url(images/Index_31.gif);
}
.substyle1_spacer{
background-image:url(images/spacer.gif);
}

#style2{
color:#CCCCCC;
font-family:Arial;
}
.substyle2_1{
font-size:18px;
}
.substyle2_2{
font-size:10px;
PHP/HTML index.php :

Code: Select all

<html>
<head>
<link href="Style.css" rel="stylesheet" type="text/css">
<title>X-Treme Soldiers</title>
</head>
<body>
<table width="729" height="900" align="center" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td rowspan="18" class="substyle1_1"></td>
	    <td colspan="9" class="substyle1_2"></td>
	    <td rowspan="4" class="substyle1_3"></td>
		<td rowspan="18" class="substyle1_4"></td>
		  <td class="substyle1_spacer" width="1" height="15"></td>
	</tr>
    <tr>
        <td colspan="9" class="substyle1_5"></td>
	      <td class="substyle1_spacer" width="1" height="112"></td>
    </tr>
    <tr>
        <td colspan="9" class="substyle1_6"></td>
	      <td class="substyle1_spacer" width="1" height="13"></td>
	</tr>
    <tr>
        <td rowspan="2" class="substyle1_7"></td>
	    <td colspan="4" class="substyle1_8">
		<?php
	           switch ($_GET['page']){
	             default: include ("webspec.php");
	             }
		?>
		</td>
	    <td class="substyle1_9"></td>
	    <td colspan="2" class="substyle1_10"></td>
	    <td class="substyle1_11"></td>
	      <td class="substyle1_spacer" width="1" height="87"></td>
	</tr>
    <tr>
        <td colspan="9" class="substyle1_12"></td>
	      <td class="substyle1_spacer" width"1" height"8"></td>
    </tr>
    <tr>
        <td colspan="10" class="substyle1_13"></td>
	      <td class="substyle1_spacer" width="1" height="16"></td>
    </tr>
    <tr>
        <td colspan="10" class="substyle1_14"></td>
          <td class="substyle1_spacer" width="1" height="25"></td>
    </tr>
    <tr>
        <td colspan="10" class="substyle1_15">
      <td class="substyle1_spacer" width="1" height="23"></td>
	</tr>
    <tr>
        <td colspan="2" rowspan="5" class="substyle1_16"></td>
	    <td class="substyle1_17">.: Navigation</td>
	    <td rowspan="5" class="substyle1_18"></td>
	    <td colspan="3" class="substyle1_19"></td>
	    <td colspan="3" rowspan="9" class="substyle1_20"></td>
	      <td class="substyle1_spacer" width="1" height="24"></td>
    </tr>
    <tr>
        <td class="substyle1_21"></td>
	    <td colspan="3" class="substyle1_22">
      <td class="substyle1_spacer" width"1" height"17"></td>
	</tr>
    <tr>
      	<td class="substyle1_23">
		<a href="?page=home">&raquo; Home</a><br>
		<a href="?page=members">&raquo; members</a><br>
		<a href="?page=forum">&raquo; Forum</a><br>
		<a href="?page=downloads">&raquo; Downloads</a><br><br>
		<a href="?page=recruitment">&raquo; Recruitment</a><br>
		<a href="?page=alliedclans">&raquo; Allied Clans</a><br>
		<a href="?page=vwar">&raquo; V - War</a><br><br>
		<a href="?page=contact">&raquo; Contact</a><br><br><br><br><br><br><br><br>
		<a href="?page=login">Member Login</a>
	  	</td>     
      	<td colspan="3" rowspan="4" class="substyle1_24">
	 		<?php	  
		  	 switch ($_GET['page']){
		  		case'home': include ("html/index.php");
		  		case'members': include ("html/members.php");
		 	 	case'forum': include ("html/forum.php");
		  		case'downloads': include ("html/downloads.php");
		 	 	case'recruitment': include ("html/recruitment.php");
		 	 	case'alliedclans': include ("html/allies.php");
		  		case'vwar': include ("vwar.php");
		 	 	case'contact': include ("html/contact.php");
		  		case'login': include ("html/login.html");
		  		}
			?>
		</td>	
 	    <td class="substyle1_spacer" width="1" height="243"></td>
    </tr>
    <tr>
       <td class="substyle1_25">
      <td class="substyle1_spacer" width="1" height="16"></td>
	</tr>
    <tr>
       <td class="substyle1_26"></td>
	     <td class="substyle1_spacer" width="1" height="27"></td>
	</tr>
    <tr>
       <td colspan="4" rowspan="4" class="substyle1_27"></td>
	     <td class="substyle1_spacer" width="1" height="207"></td>		  
	</tr>
    <tr>
       <td colspan="3" class="substyle1_28"></td>
 	     <td class="substyle1_spacer" width="1" height="19"></td>
	</tr>
    <tr>
       <td colspan="3" class="substyle1_29"></td>
	     <td class="sublstyle1_spacer" width="1" height="24"></td>
	</tr>
    <tr>
       <td colspan="3" class="substyle1_30"></td>
 	     <td class="substyle1_spacer" width="1" height="10"></td>
	</tr>
    <tr>
       <td colspan="9" class="substyle1_31"></td>
	   <td class="substyle1_32"></td>
	     <td class="substyle1_spacer" width="1" height="13">
	</tr>
    <tr>
       <td class="substyle1_spacer" width="15" height="1"></td>
	   <td class="substyle1_spacer" width="8" height="1"></td>
	   <td class="substyle1_spacer" width="8" height="1"></td>
	   <td class="substyle1_spacer" width="165" height="1"></td>
	   <td class="substyle1_spacer" width="11" height="1"></td>
	   <td class="substyle1_spacer" width="159" height="1"></td>
	   <td class="substyle1_spacer" width="6" height="1"></td>
	   <td class="substyle1_spacer" width="326" height="1"></td>
	   <td class="substyle1_spacer" width="8" height="1"></td>
	   <td class="substyle1_spacer" width="8" height="1"></td>
	   <td class="substyle1_spacer" width="1" height="1"></td>
	   <td class="substyle1_spacer" width="13" heigt="1"></td>
    </tr>
</table>
</body>
</html>
Thank U
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

In your CSS, add this:

Code: Select all

html, body {
  margin: 0px;
  height: 100%;
}
Tipp #158: Don't number your CSS classes, after a while you won't have a clue what "substyle1_23" is actually for. Make names carry meaning.
rifle
Forum Newbie
Posts: 4
Joined: Wed Nov 09, 2005 2:42 pm

Post by rifle »

foobar wrote:In your CSS, add this:

Code: Select all

html, body {
  margin: 0px;
  height: 100%;
}
Tipp #158: Don't number your CSS classes, after a while you won't have a clue what "substyle1_23" is actually for. Make names carry meaning.
ok,it works but it brings the rest out of shape .. have a look. but i might better use <div>'s than? couse <table>'s arent that good, thats what i have heard, what do u think about my code so far, as it is my 1st one ;) with php incl. but than again with <div>'s i would have to change my CSS too right ? <div>'s only work with "#ID" and not with ".class" or am i mestaking?.

(i actually think that the problem is the page itselve is to "heigh" and ur making the tabel, content of the body insisting it is full page hight "100%" so u actually enlarge it witch than again brings is out of shape ... i dont know how to mak emy page smaller lol but;.)

And firefox needs another code for "background-image:url(images/Index_18.gif)" u happely dont know what it is ? i'm talking bout CSS.

Jim.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

This has nothing to do with General Discussion.

Moved to Client-Side. :\
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

rifle wrote:
foobar wrote:In your CSS, add this:

Code: Select all

html, body {
  margin: 0px;
  height: 100%;
}
Tipp #158: Don't number your CSS classes, after a while you won't have a clue what "substyle1_23" is actually for. Make names carry meaning.
ok,it works but it brings the rest out of shape .. have a look. but i might better use <div>'s than? couse <table>'s arent that good, thats what i have heard, what do u think about my code so far, as it is my 1st one ;) with php incl. but than again with <div>'s i would have to change my CSS too right ? <div>'s only work with "#ID" and not with ".class" or am i mestaking?.

(i actually think that the problem is the page itselve is to "heigh" and ur making the tabel, content of the body insisting it is full page hight "100%" so u actually enlarge it witch than again brings is out of shape ... i dont know how to mak emy page smaller lol but;.)

And firefox needs another code for "background-image:url(images/Index_18.gif)" u happely dont know what it is ? i'm talking bout CSS.

Jim.
Meh, unless you're experienced with HTML or you want to spend a lot of time tweaking your divs for different browsers, use tables. Their more difficult to maintain, but they get the job done. And rendering is pretty much the same in all browsers.

As to the layout problem you're having, remember to put all tables into a container table. Start with a table for a general layout, ie: navbar left, content pane right. The subdivide by creating tables within cells until you get the desired result. The code will be pretty big, but most sites use that anyway.
rifle
Forum Newbie
Posts: 4
Joined: Wed Nov 09, 2005 2:42 pm

Post by rifle »

foobar wrote:
rifle wrote:
foobar wrote:In your CSS, add this:

Code: Select all

html, body {
  margin: 0px;
  height: 100%;
}
Tipp #158: Don't number your CSS classes, after a while you won't have a clue what "substyle1_23" is actually for. Make names carry meaning.
ok,it works but it brings the rest out of shape .. have a look. but i might better use <div>'s than? couse <table>'s arent that good, thats what i have heard, what do u think about my code so far, as it is my 1st one ;) with php incl. but than again with <div>'s i would have to change my CSS too right ? <div>'s only work with "#ID" and not with ".class" or am i mestaking?.

(i actually think that the problem is the page itselve is to "heigh" and ur making the tabel, content of the body insisting it is full page hight "100%" so u actually enlarge it witch than again brings is out of shape ... i dont know how to mak emy page smaller lol but;.)

And firefox needs another code for "background-image:url(images/Index_18.gif)" u happely dont know what it is ? i'm talking bout CSS.

Jim.
Meh, unless you're experienced with HTML or you want to spend a lot of time tweaking your divs for different browsers, use tables. Their more difficult to maintain, but they get the job done. And rendering is pretty much the same in all browsers.

As to the layout problem you're having, remember to put all tables into a container table. Start with a table for a general layout, ie: navbar left, content pane right. The subdivide by creating tables within cells until you get the desired result. The code will be pretty big, but most sites use that anyway.
I dont understand u clearly, ..
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

It's borderline impossible to make your current layout touch the top and bottom as it stands..at least without major changes...am I wrong? (someone correct me if I am). If I were you I'd live with the space..it's very small. :-D
rifle
Forum Newbie
Posts: 4
Joined: Wed Nov 09, 2005 2:42 pm

Post by rifle »

Charles256 wrote:It's borderline impossible to make your current layout touch the top and bottom as it stands..at least without major changes...am I wrong? (someone correct me if I am). If I were you I'd live with the space..it's very small. :-D
Hmm... NO. I will not live with it n'eather will i die with it. It will be removed ASAP. If u want it or not, its gonna happen. Anny Idee's?
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

put your entire body in a div tag and in the div tag declare top:0px and bottom:0px and make the position absolute... maybe..
Post Reply