Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
How to reduce the height by 150 from the top and bottom?

There is a fixed height, say 1000. If the screen height becomes less than 1000, then you need to remove 150 pixels from this height from the top and bottom. How can this even be done on pure js?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use css media queries for this.

for example lets say your code is

<div class='container'>
<p> This is a paragraph </p>
</div>

css

.container{
   margin-top:150px;
   height:1000px
   margin-bottom:150px;
}

 @media (max-height: 1000px) { 
    .container{
        margin-top:0px;
        height:1000px;
        margin-bottom:0px;
     }
 }

https://codepen.io/husnuljahneer/pen/poWQPgX

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!