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

133
Views
CSS file won't affect output?

So, I'm doing this portfolio tutorial, and the code is basically correct, but for me the css part has no affect on the output. the code is correct, but i'm not sure why... My repo link: Porfolio react app

Here is my html code

      <h3 className="font-bold">Take a look of our projects</h3>
      <hr />

      <div className="row">

          {projectsdata.map(project => {
              return <div className="col-md-4">
                      <div className="position-relative project">
                        <img src={project.image} alt='' />
                      
                      </div>
                </div>
          })}

    </div>

And Here is my Css code:

[.projects-intro .primary-button{
    background-color: blue;
    color: white;
    font-weight: bold;
}

.project{
    padding: 20px ;
    border: 1px solid rgba(0, 0, 0, 0.486);

}
.project img{
    height: 220px !important; 
    width:100% !important;
}]

It's meant to look like this.2Image

But mine shows up like this:3Image

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

0

try to set the width, then set the height to auto

.project img{
    height: auto; 
    width: 220px;
}

don't use the important only if you want to override a 3rd party library

however, is bad practice and should be avoided because it makes debugging more difficult by breaking the natural cascading in your stylesheets -- Mozilla Specificity

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!