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 8521261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:46:22+00:00 2026-06-11T06:46:22+00:00

I am looking for a way in CSS to set the height of a

  • 0

I am looking for a way in CSS to set the height of a text input to a percent of the normal height it would be given naturally given font-family/font-sizes, if the height was not declared. I am not looking for a percent of the height of the container it is in. Like so:
CSS:

#container {
    height: 100%;
    width: 100%;
}
input {
    width: 100%;
    background: orange;
    height: [I want this 150% of the height normally assigned to the element]
    font-family: inherit;
    font-size: inherit;
}
#results {
    width: 100%;
    background: pink;
    height: auto;
    height: 100%;
}

HTML:

<div id="container">
<input type="text">
<div id="results"></div>
</div>
  • 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-06-11T06:46:24+00:00Added an answer on June 11, 2026 at 6:46 am

    Use em:

    (...)
    height: 1.5em;
    (...)
    

    Edit

    Always good to remember:

    4.3.1 Integers and real numbers

    Some value types may have integer values (denoted by ) or
    real number values (denoted by ). Real numbers and integers
    are specified in decimal notation only. An consists of one
    or more digits “0” to “9”. A can either be an , or
    it can be zero or more digits followed by a dot (.)
    followed by one or
    more digits. Both integers and real numbers may be preceded by a “-”
    or “+” to indicate the sign. -0 is equivalent to 0 and is not a
    negative number.

    Note that many properties that allow an integer or real number as a
    value actually restrict the value to some range, often to a
    non-negative value.

    So 1,5em was garbage, sorry!

    Edit

    Your comment about em is correct, see:

    The ’em’ unit is equal to the computed value of the ‘font-size’
    property of the element on which it is used. The exception is when
    ’em’ occurs in the value of the ‘font-size’ property itself, in which
    case it refers to the font size of the parent element. It may be used
    for vertical or horizontal measurement. (This unit is also sometimes
    called the quad-width in typographic texts.)

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

Sidebar

Related Questions

I am looking für a css-way to set td-attributes in tables with an special
I'm looking for a way to use CSS to style everything between the first
Is there a best way to edit CSS? I'm looking for a designer tool.
In the markup below, I'm looking for a way (perhaps using css selector's) to
I've been looking for a way to center a div with a set max-width.
I'm looking for a way to mark when text overflows it's container. The code
I am looking for a way to be able to change the height of
I want to set the height of a div based on CSS expression. Basically
Through CSS i am able to get the v.nativebutton looking the way i want
I am looking for the best way to set a list item's currentmenu class,

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.