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

  • SEARCH
  • Home
  • 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 110663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:15:44+00:00 2026-05-11T02:15:44+00:00

I have a table (a calendar, notably). I want to make the calendar not

  • 0

I have a table (a calendar, notably). I want to make the calendar not look ugly when nothing is written in for any of the dates, so I want the minimum size of a cell to be equal to four times the font height. (That is, if I have a calendar row with nothing in it, and a calendar row with four lines of text, I want them to be the same size).

Everywhere says to use em. However, I tried using 4em for my 12pt font and it was nowhere close:

td.day {     padding: 2px;     font-size: 12pt;     width: 14.3%;     height: 4em;     vertical-align: top; } 

I counted the pixels exactly, and a 12pt font of the particular font I’m using,

font-family: verdana, arial, 'sans-serif'; 

has a height of 22px. This isn’t very flexible, however… is there any better way to do this?

Thinking about it more, I’m sure the em unit correctly tells me the font’s height. It just doesn’t take into account the line spacing or the padding or anything else of that sort. Is there any way to do this that would?

  • 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. 2026-05-11T02:15:45+00:00Added an answer on May 11, 2026 at 2:15 am

    You have to take into account your line-height multiplier. For your td element, if you pick a font-size of 12pt, you must also assign a line-height. For example, if you wanted a line-height of 18px with your 12pt font size:

    td.day {     font-size: 12pt;     line-height: 1.5; } 

    Just be sure not to use a unit like em or px to designate a line-height, since it is a multiplier of your font-size. Your line-height would now be 18px, or if you want to use ems, 1.5em. Now, if you want to assign a height of four lines, you would use 6em.

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

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Create and run .Reg file with this and make sure… May 11, 2026 at 1:01 pm
  • added an answer Additional dependancies was 'NoInherit', when I looked 'under' the setting,… May 11, 2026 at 1:01 pm
  • added an answer Try using {{ array1|safe }} and see if that makes… May 11, 2026 at 1:01 pm

Related Questions

I have a table A with 2 columns Foo and Bar. I have a
I have a table in a SQL Server 2005 database with a trigger that
I have a table with a structure like the following: LocationID AccountNumber long-guid-here 12345
I have a table with a 'filename' column. I recently performed an insert into
Is it possible to add properties to my model that dont exist in the
New to both Ruby and Rails but I'm book educated by now (which apparently
I have a records of events with starttime and endtime for a calendar control.
I have unevenly distributed data (wrt date ) for a few years (2003-2008). I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.