c# - Fix the height of table in html while printing -


i have created report displayed in webpage. it's set of tables 1 below other. has total 4 tables. now, out of 4, 3 tables having fixed height( content fixed), 1 table has content in number of rows vary. how can keep height of table fixed, irrespective of content. if height increases, content size(row size) should minimized, whole report should printed on single a4 size paper. have tried using min-height , max-height.

there isn't going "one size fits all" solution this. there maximum number of rows can displayed fit on 1 physical a4 page. imagine maximum 10 rows, hit 11 rows spill on next page.

you can reduce table cell height off increase number of rows can displayed can make cells small before become unreadable.

once know best maximum may wish build "maximum report size" application prevents more maximum numbers of rows being output page in first place.

you may able consider reducing width of table less 50% of page width, have 2 tables side-by-side. depends on how many columns need display of course. may able fit of other 3 tables side-by-side using method.

edit:

as said in comments way find row height divide total available height number of rows. if have 400 pixels available , need display 8 rows then:

400 / 8 = 50 

each row must 50 pixels in height - including padding , borders take account. setting in c# fastest way apply rows.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -