I’m working on react typescript , and I have to display some projects (or jobs) in form of cards , but I want the cards to be displayed one below another this is the display
and this is the project component where I display the projects:
export function Project({ project }: { project: IProject }) {
return (
<Card title={project.title} bordered={true} className="Card-Project">
<p>Description:{project.description}</p>
<ul>
Skills Required:
{project.skillsRequired.map((skill, index) => (
<li key={index}>{skill}</li>
))}
</ul>
<p> budget :{project.budget} CA$</p>
<p>Experience Level: {project.experienceLevel}</p>
<p>Category:{project.category}</p>
</Card>
)
}
this is the card project css file :
.Card-Project {
width: 180%;
margin: 0 auto;
padding: 24px;
margin-top: 20px;
margin-left: 250px;
margin-bottom: 20px;
background-color: hwb(0 97% 0%);
}
I tried to put them one below another
3
Answers
The easyest way is put them in a div container what is flex, and set flex-direction to column like this:
In your css, try adding display: block; property.
you can try this