id="info"

Question

Locked

HTML question

By Slayer_ ·
Google isn't being very helpful today

So I got a long page of tables, it's meant to be printed. each table is one after another, with no line breaks.
Basically, its table /table table /table
etc.
It's done this way to look like a table in word, but as separate tables so that HTML paginates properly.

This works good, but the borders of the tables double up, making the top border of each subsequent table double width in appearance.
I fixed this in css by setting the top border of the table to 0. Thus, every bottom border is the next tables top border and it looks good. For the first table in the list, I changed the code to put the top border. Making it the only table in the list of tables that has a top border.

But my issue, when the tables get distributed to printed pages, the second page starts the table without the top border.

So how do I fix it so that, either the first table on the second page has the border, or that the borders don't double each other up?


If it matters, this page is only ever displayed in Internet Explorer.

This conversation is currently closed to new comments.

11 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Bump

by Slayer_ In reply to HTML question
Collapse -

Still need help

by Slayer_ In reply to HTML question
Collapse -

is split tables to look like pages an option?

by Who Am I Really In reply to HTML question

without knowing the content type I can only ask
would splitting the tables to appear as individual pages work?
or would it be disruptive to the content when viewed in the browser?
- obviously it wouldn't be disruptive to the content in the printed form
as each table should end up on it's own page anyway

maybe you could build like this
table
/table
p
/p
hline
p
/p
table
/table

or
table
/table
br
hline
br
table
/table

etc. . ..

build the tables so that the hline p /p or hline br is the last thing on each printed page
and the next table is the first thing on subsequent pages

after a short trip to the g search box
apparently there are ways to do page breaks in HTML code for printing
(google results for: force page break html for printing purposes = About 356,000,000 results)

but I haven't done any of that type of coding
I just create split tables for web viewing
where the content changes and requires a separate table but on the same page
and usually use either p /p or br or combination

Collapse -

Reponse To Answer

by Slayer_ In reply to is split tables to look l ...

Sorry, the content type is just normal html4. With a touch of CSS thrown in for styling some basic things and floating some stuff.

Forcing page breaks is not a terrible idea, but as each table can be a different size, I like it using the entire page as best as possible, I am not sure how in code to detect a page break.

This webpage is generated by a .net program. The program mostly loops through records and makes tables. So knowing how many records can fit on a page would be difficult.

Is there a way to make it so that when tables are stacked one below the other, that the borders don't double up on the sides touching the tables? Because that would be an ultimate solution.

Collapse -

Reponse To Answer

by Slayer_ In reply to is split tables to look l ...

This screenshot is of version 1, but, see how the top border is doubled up?

I fixed that by removing the top border, so the previous tables bottom border was the next tables top border.
But when HTML paginates, the first table on the new page now has no top border.

Is it possible to just fix the doubling up of the borders?
http://trevorsarchives.homenet.org/temp/CropperCapture%5b1%5d.jpg

Collapse -

Would it be possible...

by kmthom In reply to HTML question

to just forgo using multiple tables and instead throw everything in to one table and edit each line of cells? For example, edit the first row to have a slightly thicker border to simulate a new table. I haven't done ANY HTML since college so I couldn't give any first hand code examples...but here's a link I found that helps explain how to assign a border on one side of a cell:

http://www.cs.tut. fi/~jkorpela/html/cellborder.html
(remove spaces for active link)

Of course, printing this might be an absolute nightmare unless you can get the HTML line breaks that "Who am I really" suggested...

Hope this helps you

-=K=-

Collapse -

Reponse To Answer

by Slayer_ In reply to Would it be possible...

When I did that, it didn't seem possible to cause HTML to know where to break a table for each page. You can tell it not to split a single row, but not to keep two rows always together (header and details).
This is a picture of what each table looks like.
http://trevorsarchives.homenet.org/temp/CropperCapture%5b1%5d.jpg
You can see the original double border problem.

Collapse -

Reponse To Answer

by kmthom In reply to Would it be possible...

In that case, I would try sticking a table within a table. What I mean is, if you have 2 rows that you always want to stay together, stick those two rows within a cell of the larger table, then use the border options on that larger table. Maybe HTML would keep that data together is if was "encapsulated" within a cell of a larger table.

I dunno, you probably tried all that. Problems like these are difficult to get across or solve, lol.

-=K=-

Collapse -

Reponse To Answer

by Slayer_ In reply to Would it be possible...

I never tried that actually, its a good idea.

I will try it and get back to you.

Collapse -

Ok tried it, didn't work

by Slayer_ In reply to HTML question

If I make the inner tables have the borders, they still double up, if I have the outer table have the borders. It messes up on the page break by drawing the bottom of the cell on the next page, so the last cell of page 1 won't have a border (it shows on page 2 instead). Which is just the opposite problem I had before.

Back to Browser Forum
11 total posts (Page 1 of 2)   01 | 02   Next

Software Forums