Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7434905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:58:09+00:00 2026-05-29T09:58:09+00:00

Short Trying to get table with exact dimensions for a4 print Table’s first and

  • 0

Short

Trying to get table with exact dimensions for a4 print

  • Table’s first and last rows’ margin from top and bottom sides of paper must be 11 mm
  • Margin between rows’ 0 mm
  • Table’s rows must be at 4 mm from left and right sides of paper
  • 2 mm between every column
  • 38 mm width x 21.2 mm height each cell
  • 13 x rows, 5 x columns, 13×5=65 cells

Here is JS fiddle

http://jsfiddle.net/tt13/ZjBrV/

Question

What can I do in this case? How to get the table with conditions that I explained above?

Detailed

html table looks like that

<body>
  <table>
    <td> 
     <div class="bcell">
      sample text2<br/>
      <img src="..."/><br/>
      sample text2
     </div>
     </td>
   ....
  </table>
</body>

Using css below to achieve A4 size print result, but getting something absolutely different from conditions that I explained above.

        body {      
            padding:11mm 4mm 0 4mm;
            background: white;
            font-family: Arial;
            width: 210mm;
            font-size:3mm;
        }

        table { 
            page-break-after:always;
            width: 100%;
            height: 275mm;
            margin:0 auto;
            page-break-inside:avoid;                 
            border-collapse: collapse;

        }

        td img {
            height:10mm;
        }

        td {
            width: 38mm;
            height:21.2mm;
            padding: 0 1mm 0 1mm;
            font-style: bold;
            text-align: center; 
            vertical-align:middle;
        }


        tr    { 
            page-break-after:auto;
            page-break-inside:avoid; 
            height:21.2mm;
            margin:0;
            padding:0;
            page-break-inside:avoid;             
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:58:11+00:00Added an answer on May 29, 2026 at 9:58 am

    Css is not effective in changing the width of table cell elements. What you’ll want to do is either wrap the content of the cell in a div or span and use the td:first-child to set the width in the css, or use the css table model.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get 2 rows from a table at one shot. The
I'm trying to get get the short filename from a long filename but I'm
I'm following this tutorial: http://www.javascripttoolbox.com/jquery/ And I'm trying to get table rows that are
I'm trying to get rid of curly apostrophes (ones pasted from some sort of
I have a jobs table, and am trying to get a count of jobs
i m trying to get data from my database and present them to a
I am trying to insert a row into a MySQL table and get it's
I'm trying to get all the IDs in the table by cursor. The table
I'm trying to take values from a table and put them into a string
first a short summery: python ver: 3.1 system: Linux (Ubuntu) I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.