Jump to content

aligning embeded tables


Q695

Recommended Posts

I've been having trouble embedding a table within a table for a while now, and feel like giving up.  I use a php include for this application, to more easily perform layout.

 

The reason I'm rewriting the pages is because I'm unable to contact the old webmaster to get the files off his server for some reason, and he sold his business that is currently hosting the pages.

 

Master page is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">

<head>

<?php

//error_reporting(E_ALL);

$page=$_GET['page']

?>

 

<meta content="en-us" http-equiv="Content-Language">

<title>MN - SD52 - GOP</title>

<style type="text/css">

.text {

color: #FFFFFF;

font-weight: bold;

}

.text2 {

color:#0000FF;

}

.textb {

color:red;

}

.link {

text-decoration: none;

}

.rule {

height:3px;

background:#000080;

border:0px;

}

.hr {

background:red;

border:0;

height:6px;

}

</style>

</head>

 

<body bgcolor="blue" text="white" style="margin: 0;">

<table cellspacing="0" align="center" border="0">

<tr>

<td colspan="2" bgcolor="white">

<img src="images/banner_top2.jpg"> </td>

</tr>

 

 

<tr>

<td align="center" bgcolor="#CC0000" colspan="2">

<strong>

<a class="link" href="?page=0"><span class="text">Home</span></a> | 

<a class="link" href="?page=1">

<span class="text">SD 52 Info</span></a> | 

<a class="link" href="?page=2">

<span class="text">News</span></a> | 

<a class="link" href="?page=3">

<span class="text">Calendar</span></a> | 

<a class="link" href="?page=4">

<span class="text">Elected Republicans</span></a><b> | 

</b>

<a class="link" href="?page=5">

<span class="text">Links</span></a> | 

<a class="link" href="?page=6">

<span class="text">Get

Involved</span></a> | 

<a class="link" href="?page=7">

<span class="text">Contribute</span></a> | 

<a class="link" href="?page=8">

<span class="text">Contact Us</span></a>

</strong>

</td>

 

</tr>

<tr>

<td align="center" style="background-color:white;padding:0;">

<?php

 

if (0<=$page & $page<=8)

{

switch ($page) {

case 0:

    include"home.php";

    break;

case 1:

    include"sd_info.php";

    break;

case 2:

    include"news.php";

    break;

case 3:

    include"calendar.php";

    break;

case 4:

    include"elected.php";

    break;

case 5:

    include"links.php";

    break;

case 6:

    include"involve.php";

    break;

case 7:

    include"contribute.php";

    break;

case 8:

    include"contact.php";

    break;

}

}

/*-------side bar-------------

side navagation bar goes here

use "?page=$page&sub="___number___ for hyperlink

start with sub=0

 

only include the body/td text for html compliance

referr to info.php for example

 

remember to use the style scripts

*/

/*text would go here

will pull from a text database

follow rules for the side bar

*/

?>

</td>

<td bgcolor="#CC0000" align="center" style="width:100px" valign="top">

 

<?php

include "basic/info.php";

 

////////////////I'm currently working on this portion, but feel free to work on it for layout if you have time

?>

 

</tr>

<tr>

<td colspan="3" bgcolor="#CC0000" align="center">

 

<strong>Paid for by the Republican Party of Minnesota Senate District 52.

<br>Not authorized by any candidate or candidate committee.</strong></td>

</tr>

</table>

</body>

 

</html>

 

 

 

Slave page is:

<table bgcolor="white" align="center" border="0" cellpadding="0" cellspacing="0">

<?php

$sub=$_GET['sub'];

if (!$sub) {

$sub=3;

}

echo "

<td bgcolor=\"#CC0000\" style=\"width:125px\">

<center>

<font color=\"#ffffff\"><strong>Contact Us</strong></font>

<hr class=\"rule\">

<a class=\"link\" href=\"?page=$page&sub=0\">

<span class=\"text\">

Volunteer</span></a><br><hr class=\"rule\">

<a class=\"link\" href=\"?page=$page&sub=1\">

<span class=\"text\">

Contribute</span></a><br><hr class=\"rule\">

<a class=\"link\" href=\"?page=$page&sub=2\">

<span class=\"text\">

Minnesota PCR</span></a><br><hr class=\"rule\">

<a class=\"link\" href=\"?page=$page&sub=3\">

<span class=\"text\">

Contact Us</span></a><hr class=\"rule\">

</center>

</td>

<td bgcolor=\"white\" valign=\"top\">

<div style=\"text-align:center\">

<font color=\"navy\" size=\"16\">

Senate District 52</font> </div>

<hr style=\"color:red; background:red; height:5px\">

</td>

";

?>

</table>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.