View Single Post
Old 09-24-2024, 12:04 AM   #14
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,139
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by foosion View Post
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>
line-height does not get a unit of measurement .
Code:
line-height: 1.2   /* (a normal default) */
line-height: 120%
theducks is offline   Reply With Quote