Hallo,
ich teste gerade ein wenig mit Icons herum.
Hier mal meine Styles:
Markup:
Ist es möglich, das Icon immer mittig zur H2 auszurichten? Egal, ob meine H2 jetzt 1em oder 2.5em groß ist?
ich teste gerade ein wenig mit Icons herum.
Hier mal meine Styles:
HTML:
body {
font-size: 13px;
line-height: 1.4;
}
HTML:
h2 {
font-size: 1.75em;
line-height: 1.5em;
margin: 0;
}
HTML:
/* ======================================================
Icons 16px
====================================================== */
.ico-star { position:relative; padding-left:16px; }
.ico-star:before {
position: absolute;
clip: rect(0, 16px, 16px, 0);
content: url(../img/icons-16px.png);
left: 0;
top: 0;
}
Markup:
HTML:
<h2 class="ico-star">Typografie</h2>
Ist es möglich, das Icon immer mittig zur H2 auszurichten? Egal, ob meine H2 jetzt 1em oder 2.5em groß ist?