Czy istnieje sposób wyrównania pierwszego wiersza wielu nagłówków o różnej wielkości do tej samej linii bazowej? Niezależnie od tekstu, który następuje, który również powinien być wyrównany.wyrównać nagłówki do tej samej linii bazowej, niezależnie od następującego tekstu?
Zobacz obraz w http://snapplr.com/snap/z1mw proszę
EDIT: re-upload:
alt text http://img144.imageshack.us/img144/7615/screenshot2010021722h53.png
Wydaje mi się, że jedynym rozwiązaniem jest wprowadzenie każdej pozycji i każdy tekst ciało w oddzielnym DIV i następnie z nagłówkami do grania z górnym lub górnym marginesem, aby je wyrównać (np. H1 miałby 36px z marginesem 0px, podczas gdy H3 byłby 24px z górnym marginesem 12px). Coś takiego:
<html>
<head>
<style type="text/css" media="all">
div {
width: 240px;
float: left;
}
h1 {
font-size: 36px;
margin: 0;
padding: 0;
}
h3 {
font-size: 24px;
margin: 0;
padding: 10px 0 0 0; /*for some reason I must use 10px instead of 12px to align. Why??*/
}
</style>
</head>
<body>
<div>
<h1>H1 heading</h1>
</div>
<div>
<h3>H3 heading</h3>
</div>
<div>
<h3>H3 heading that is somewhat longer and spans multiple lines</h3>
</div>
<div style="clear:both;"></div>
<div>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
</div>
<div>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
</div>
<div>
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p>
</div>
</body>
Ale to nie jest bardzo miłe rozwiązanie. Czy jest coś lepszego?
Dziękuję bardzo!
Witamy w przepełnieniu stosu. –
Sprawdziłem twoją próbkę w Photoshopie i potrzebujesz 12 px - to tylko rodzaj złudzenia optycznego ze względu na szeryfowe czcionki :) – easwee
Powiększony http://img682.imageshack.us/img682/1604/optic. jpg – easwee