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

236
Views
How to move text in a display block div

.score{
    font-size: 20px;
    text-align: center;
    background-color: white;
    width: 700px;
    height: 200px;
    border: 1px solid white;
    border-radius: 0px 0px 10px 10px;
    display: block;
    margin: 0 auto;
}
.score p span{
    padding-top: 100px;
}
    <div class="score">
        <p>bb<span id="correctAns">jkjh </span></p>
    </div>
I want to move my text down a little bit but it's not working, putting padding in .score just makes it bigger and nothing happens if I put it in .score p span.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Nepotech's answer is correct. An other way is useing line-height for .score:

.score {
  font-size: 20px;
  text-align: center;
  background-color: white;
  width: 700px;
  height: 200px;
  border: 1px solid white;
  border-radius: 0px 0px 10px 10px;
  display: block;
  line-height: 100px;
}
<div class="score">
  <p>bb<span id="correctAns">jkjh </span></p>
</div>

over 4 years ago · Santiago Trujillo Report

0

Just Use margin-top to p element

  • Note: I have changed color to blue, for better understanding!

.score{
    font-size: 20px;
    text-align: center;
    background-color: blue;
    width: 700px;
    height: 200px;
    border: 1px solid white;
    border-radius: 0px 0px 10px 10px;
    display: block;
    margin: 0 auto;
}
p{
    margin-top: 100px;
}
<div class="score">
        <p>bb<span id="correctAns">jkjh </span></p>
    </div>

over 4 years ago · Santiago Trujillo 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!