CSS Tips

To center an image, use margin: auto; and make it into a block element:

img {
display: block;
margin: auto;
width: 40%;

Highlight alla länkar som inte länkar nånstans!

a:not([href]) {
outline: .125em solid red;

Alla bilder utan alt-text vrids 180 grader

img:not([alt]) {
transform: rotate(0.5turn);

Stödlinje i mitten

body::after {
content: ”;
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 1px;
background-color: #00f;
height: 100vh;
z-index: 999;

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.