Wednesday, March 3, 2021
Latest:
  • Name of insects in English
  • Musical instrument Names.
  • Names of different trees.
  • Things we should do before buying a Apple MacBook
  • What is useEffect hook in React? How to use useEffect hook?
Upokary

Upokary

Quality information

  • Health
  • Life
  • Fashion
  • Food
  • Code
  • English
  • বাংলা
Technology 

How to horizontally center an element using CSS?

Published: January 25, 2021Last updated: January 25, 2021 css

In this post, we will discuss the different approaches to make an element centered using CSS. Let’s consider we have the following parent and child element.

<div class="parent">
    <div class="child">Content</div>
</div>

Following is the style to make it horizontally centered.

<style>
    .parent{
        display: flex;
        justify-content: center;
    }
</style>
Share
  • ← How to stop bleeding in a natural way for minor cuts?
  • ocean or sea animals name →

You May Also Like

How to add multiple language support in ReactJS with i18next and react-i18next?

September 30, 2020 beroza 0

Useful regular expression that every developer should know

July 6, 2020 beroza 0

What are the correct file permission for WordPress site?

January 9, 2020 beroza 0

What is for…of loop in JavaScript?

May 21, 2019 beroza 0

How to disable a link on a webpage using CSS, JavaScript, jQuery etc?

March 3, 2020 beroza 0

Difference between session.timeout.ms and max.poll.interval.ms for Kafka

June 9, 2020 beroza 0

HTML5 related interview questions

May 9, 2019 beroza 0

How to Install ngrok using brew on mac?

September 16, 2019 beroza 0

AutoComplete Material-UI case insensitive filter

October 29, 2019 beroza 0
Health benefits delicious fruit Cherry
Health benefits of Spring Onion
How to get rid of bad breath?
Lettuce leaves health benefits
Best foods that are high in Zinc
Which foods are high in magnesium? How much magnesium is better to take daily?
Health benefits of Capsicum
Health Benefits of Radish
Spinach Health Benefits
Health benefits of Cabbage
Excessive sugar intake is harmful to the kidneys and liver
Seim bean or lablab bean health benefits
Health benefits of Kohlrabi
Health benefits of Olives
Health benefits of Cauliflower
Health benefits of green peas
Health benefits of Coriander
Health benefits of Broccoli
Health benefits of Basil Seeds (Tokma, Sabja Seeds, Tukmaria)
Health benefits of Carrots
Health benefits of Rambai fruits
How healthy is our weight according to our height?
Health benefits of Black Tea
Health benefits of Baking soda
Basil leaves or Tulsi leaves health benefits

Why Upokary?

Upokary.com is a useful application in everyday life. It provides very handy information regarding every aspect of life. Each and every tip of upokary.com is meant to make life better.

Upokary tools

  • Youtube thumbnail
  • Youtube video downloader

Useful Links

  • Handy code
  • Technology
  • People
  • Programming
  • Quote
  • Travel
  • WordPress
  • IELTS
  • Kids

Languages

  • EnglishEnglish
  • বাংলাবাংলা

Pages

  • Sitemap
  • Privacy policy
  • About us
  • Contact us

Support

For any kind of query or question please drop a message in the following email: upokary@gmail.com
Copyright © 2021 Upokary. All rights reserved.