View Single Post
Old 08-20-2012, 03:57 PM   #1
Kittybriton
Member
Kittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchforkKittybriton can load mercury with a pitchfork
 
Kittybriton's Avatar
 
Posts: 12
Karma: 48138
Join Date: Aug 2012
Device: FBReader, Cool Reader and Aldiko (Android Tablet)
What dark art is this?

Fortunately for me, I have a brother who studied engineering, and he introduced me to the idea of a cascade error - something unobtrusive that causes unexpected behavior of code which is very difficult to trace, because it affects things that it is seemingly not directly related to.

CSS seems like something of a dark art to me: after figuring out the complexities of embedding a font (largely thanks to posts here), redefining the H1 entity (defined after the body entity in a single style sheet, as copied below) caused the body to add the same amount of line space as the H1. The line-height: 100%; was added to the body definition to correct this effect, but I don't understand why it should have been necessary.

Does this make sense to anybody

Code:
body {font-family:"Palatino Linotype", Georgia, serif; 
	text-align: justify; 
	line-height:100%;
	}

h1 {font-family: "Palatino Linotype", serif; 
    font-weight: normal; 
    font-style: italic;
    font-weight: bold;
    color: rgb(24, 136, 173);
	text-align: center;
	line-height: 110%;
    }
Kittybriton is offline   Reply With Quote