View Single Post
Old 09-23-2024, 01:57 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
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>
What happens if you use the slider and make the line height extra large to see if this works when the line wraps?
JSWolf is offline   Reply With Quote