FET Forum

FET Support (English) => General Stuff => Topic started by: llbuenoo on May 24, 2013, 06:47:04 PM

Title: HTML table with fixed width
Post by: llbuenoo on May 24, 2013, 06:47:04 PM
Hello all.

I need to reformat the HTML outputs in order to print them, so I need to have the tables with a fixed size.

I tried to edit the CSS file in order to have this result, but there is a problem with some of the tables.

I tried a solution that Volker gave in the topic http://lalescu.ro/liviu/fet/forum/index.php?topic=102.msg444#msg444 but, for some reason, it doesn't worked. But, changing the table format from

table {
  text-align: center;
}


to

table {
  table-layout: fixed;
  width: 2000px;  /* Important */
  text-align: center;
}


worked in the sense of having the table and the columns with fixed width, but this way some of my activities don't show up correctly.

Actually, the text of the cell appears 3 or 4 cells after the correct location and with some texts superimposed to others.

There are two files in te attached zip that can be used to show the problem.

In my table I have some activities that are splited between two teachers. These activities are always in 2 period classes (2 FET hours with the same teacher), but FET repeats the same activity two times, others activities appears as a one activity that spans through 2 FET hours. It would me better  if these activities showed up the same way the others do (1 of 2 hours instead of 2 of 1 hour). I think that this is a limitation and I suggest that this change could be added in future versions. If I am wrong, please show me how to do this change
Title: Re: HTML table with fixed width
Post by: Volker Dirr on May 26, 2013, 12:01:59 AM
I see what you mean.

This happen, because there are tables in the table. It has nothing to do with the span.

So your bug is coding that stuff in :table {}


You must code it two times in: table.odd_table  {} and table.even_table  {} if you want to use that trick.

(But you still need to use smaller font, shorter names or larger tables).
Title: Re: HTML table with fixed width
Post by: llbuenoo on May 27, 2013, 12:56:14 PM
Thank you, Volker.

I started reading the HTML code after the post and realized that there are tables inside the tables, but I haven't tried to put the size in the even and odd table definitions. I will try to get the tables working with these changes.

On the cell span issue. It can be a suggestion on future versions as it would increase the readability of the tables as it will have no repeated cells for activities with more than one hour.

Another suggestion for a future release is the option to only "print" to HTML the hours that the students have. In my case, I have students divided in turns (morning, afternoon and evening) and each turn only have ativities in that specific turn. When I generate the tables, the morning students' table have the afternoon and evening hours as not available (there are restrictions for this in the .FET file). The same occurs in the afternoon and evening students. I suggest that these not available hours of the students don't end up in the final HTML table.

Thank you, anyway.
Title: Re: HTML table with fixed width
Post by: Liviu Lalescu on May 30, 2013, 11:56:44 AM
Thank you, I will add your suggestions in the TODO file, but please write here exactly the text I should put there.

Edited to add: Volker told me the exact text to add, so I added these two suggestions in the TODO.