Skip to content

CSS code snippet – How to make div width auto adjust?

.center {
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
See also  Python code snippet - How to get a specific character in a string on number ?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.