.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
<!-- HTML here not CSS! -->
<!DOCTYPE html>
<head><!-- Title goes here --></head>
<body>
<center><!-- Center's anythings -->
<img src""><!-- Put image name (e.g example.jpeg) -->
</center>
</body>
</html>
<center>//The thing you want to center</center>
Code Example |
---|
Css :: css3 background image curve |
Css :: edit hover with sass |
Css :: css disabled cursor not allowed |
Css :: css n number of lines only |
Css :: change placeholder color |
Css :: how to center text in css |
Css :: how to margin placeholdr text |
Css :: webpack/load/css |
Css :: minimum margin css |
Css :: text indent css |
Css :: icon rounded corners css |
Css :: convert firebase created_at to Date string |
Css :: text flow top to bottom |
Css :: rgba green color |
Css :: how to add a linear gradient in css |
Css :: scrollbar-color |
Css :: box model properties |
Css :: use css in cshtml |
Css :: how to underline font in css |
Css :: how to move anything left in css |
Css :: list decoration none |
Css :: Bootstrap default accordion arrow icon change |
Css :: live sass compiler settings |
Css :: flex align self |
Css :: tailwind table |
Css :: line cap css |
Css :: flexbox properties css |
Css :: pure css tabs |
Css :: how to change border height in css |
Css :: overflow css |