View Single Post
Old 09-23-2024, 01:52 PM   #1
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
line-height confusion

I have a page the has one line of text. I'd like there to be only a small amount of space between the lines if it is too long to render on just one line (it wraps). I had thought setting a small line-height would help, but whatever I use for line-height I get the same distance between the lines. I've tried large and small numbers with em, unitless and %, but it always looks the same.

What obvious mistake am I making?

Code:
p.part {
  font-size: 1.4em;
  margin-top: 2em;
  line-height: 0.8em;
  text-align: center;
  text-indent: 0;
}
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
		<title>Schwarzschild’s Singularity</title>
		<link href="css/nyrb.css" rel="stylesheet" type="text/css"/>
<meta content="urn:uuid:f6153998-8e9b-4e44-bcd6-bee1e61d1b96" name="Adept.expected.resource"/>
	</head>
	<body>
		<div>
			<p class="part"><a id="uIjbHnpIXhoMvLyexvkU5BC"></a>Schwarzschild’s Singularity</p>

</div>
</body>
</html>
foosion is offline   Reply With Quote