Css-content
Share
Flag
Related
Vertically aligning CSS :before and :after content
I am trying to centre the link with the image, but can't seem to move the content vertically in any way.<h4>More Information</h4>
<a href="#" class="pdf">File Name</a>The icon is 22 x 22px.pdf {
font-size: 12px;
}
.pdf:before {
padding:0 5px 0 0;
content: url(../img/icon/pdf_small.png);
}
.pdf:after {
content: " ( .pdf )";
font-size: 10px;
}
.pdf:hover:after {
color: #000;
}
2024-05-01 16:15:12