Page 1 of 1

Include of a table

Posted: Tue 20 Aug 2019 7:48 pm
by HansR
I use the wxnewpage template and add an include line for a text-file which contains two tables.
See code below. The result is here. As you can see, it displays, but not as intended (I want it displayed according to table style as you can see in the txt file).
In another situation (and here also) I can simply display a table and it works as wanted and expected.

So, what is happening with my pwsFWI.txt file?

Code: Select all

<div id="main-copy">
  
	<h1><?php langtrans('Sample Blank Page'); ?></h1>
    
    <p>This is a sample page</p>

<?php include('pwsFWI.txt');?>


    <p>Copy it to a new name and use as the base for a new page on your site.</p>
    
</div><!-- end main-copy -->

Re: Include of a table

Posted: Tue 20 Aug 2019 8:48 pm
by beteljuice
Your content is below the footer !

Re: Include of a table

Posted: Wed 21 Aug 2019 2:40 am
by HansR
beteljuice wrote: Tue 20 Aug 2019 8:48 pm Your content is below the footer !
I noticed that, thats why my message, because i definitely did not put it there and as you can see in my code, the include is in the main section. So how does it end up below the footer?

Best,

Re: Include of a table

Posted: Wed 21 Aug 2019 2:48 am
by beteljuice
Ah ...

NO closing </table> ;)

Re: Include of a table

Posted: Wed 21 Aug 2019 2:55 am
by HansR
Ai... :oops:

Re: Include of a table

Posted: Wed 21 Aug 2019 12:02 pm
by HansR
But having corrected that, see page here, I still do not understand why I can not center (or justify) the table and the colored indicators (div's). The included code is pwsFWI.txt and you find it here. I want the tables centered on the <div id=main-copy> and the texts in the <TD> blocks centered as well. neither style nor old format align works. Any suggestions.

Best,

Re: Include of a table

Posted: Wed 21 Aug 2019 1:21 pm
by Mapantz
Try changing the main table width to 100%

or..

Code: Select all

<table style="width:80%; margin-left:auto; margin-right:auto; border-collapse: collapse; background-color: #d7d7d7;"></tbody>

Re: Include of a table

Posted: Wed 21 Aug 2019 2:25 pm
by HansR
Yes, the second solution of the margin-auto works.
But that leaves the question with about the align:center style?
Anyway, problem solved. Thnx.

Best,