0 votes
102 views
in HTML by (2.2k points)
edited
How do you center align the content of a card horizontally and vertically?

1 Answer

0 votes
by (98.9k points)
edited

Use CSS flexbox or CSS grid to center align the content of a card. Here's an example using flexbox:

.card {
  display: flex;
  justify-content: center; /* horizontally center */
  align-items: center; /* vertically center */
}

Related questions

0 votes
1 answer 113 views
0 votes
1 answer 164 views
0 votes
1 answer 122 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 95 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 73 views
0 votes
1 answer 123 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

561 users

...