Jump to content

aligning columns


tomfmason

Recommended Posts

I am knew to php. Before now my site was html only. I am now switching to php and am running into some problems.

I am not sure if css would be the best way to do what I want or not. I am not expecting anyone to write the code for me. I would rather be pointed in the right direction, so that I will learn. Here is a link to a page that will explain my problem better [a href=\"http://www.owpt.biz/test/index.php\" target=\"_blank\"]OWPT[/a]. Any help would be greatly appericated.



Thanks

Link to comment
https://forums.phpfreaks.com/topic/12968-aligning-columns/
Share on other sites

[!--quoteo(post=388269:date=Jun 26 2006, 06:37 PM:name=Caesar)--][div class=\'quotetop\']QUOTE(Caesar @ Jun 26 2006, 06:37 PM) [snapback]388269[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Can you please be a bit more specific as to what you're asking?
[/quote]

When I split my site into different columns (i.e header, footer, right column, left column and center) I get a big mess. Big mess being, The header is centered the way I want but the left column and center are in the center of the page (on top of each other) and the footer and right column are way off. I have an example and the problem explained better as well as copies of my php code at the site.
Link to comment
https://forums.phpfreaks.com/topic/12968-aligning-columns/#findComment-49872
Share on other sites

Good grief - what awful code.

This is nothing to do with php and everything to do with html. height is not a valid attribute for table. height is not a valid attribute for tr or td either. Table elements take their height from the amount of their content. The mis-alignment is caused by using the align attribute for the tables incorrectly. You have pseudo-style attributes for some table elements and those are meaningless as you have coded them.

Best bet - code better and clean up the html. Oh, and you can't put the BODY tag at the end of the page.
Link to comment
https://forums.phpfreaks.com/topic/12968-aligning-columns/#findComment-49874
Share on other sites

my little example

Alter width and height

[code]
<html>
<head>
<title>  </title>
<body>

// table to put all tables in a squre.

<table border="4"  bordercolor="black" align="center" height="" width="">
<td>

// table for the header.

<table  border="4" bordercolor="black" align="center" height="" width="">
<td>
<?php include("header.php");?>
</td>
<table>

//table for the center.

<table border="4" bordercolor="black" align="center" height="" width="">
<td>
<?php include("center".php);?>
</td>
</table>

//table for the footer.

<table border="4" bordercolor="black" align="center" height="" width="">
<td>
<?php include("footer.php");?>
</td>
</table>

// this is to end the table for the whole tables.
</td>
</table>

</html>
</body>
</head>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/12968-aligning-columns/#findComment-49877
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.