View Full Version : ADE breaks CSS --> CSS Validation: Parse Error / Value Error


dasboeh
12-09-2012, 04:15 AM
Hello,

I'm stuck with a CSS validation problem.

My ePub I created for a publisher validates just fine with ePub-Check. But when I open it in ADE, it won't accept the CSS file. So I followed the clues in this forum and validated my CSS here (http://jigsaw.w3.org/css-validator/validator).

It gives me the following Errors:
75 p.Subhead2 Value Error : font-style Too many values or values are not recognized : italic text-align
75 p.Subhead2 Parse Error : center;
81 Parse Error [: 0.8em; margin-top : 1.5em; page-break-after:avoid; } p.S4_Impressum]

I can't really imagine how to change p.Subhead2 to validate. Same with the error on line 81.

Can you please look at my CSS? What did I do wrong?
@font-face{font-family: "Tinos"; src: url(../Fonts/Tinos-Regular.ttf); font-style: normal; font-weight: normal;}
@font-face{font-family: "Tinos"; src: url(../Fonts/Tinos-Bold.ttf); font-style: normal; font-weight: bold;}
@font-face{font-family: "Tinos"; src: url(../Fonts/Tinos-Italic.ttf); font-style: italic; font-weight: normal;}
@font-face{font-family: "Tinos"; src: url(../Fonts/Tinos-BoldItalic.ttf); font-style: italic; font-weight: bold;}

@page {margin: 1.5em;}

body {
font-family: "Tinos", serif;
margin: 5% 10% 5% 10%;
}

p {
font-family : "Tinos", serif;
font-weight : normal;
font-style : normal;
font-size : 1em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : justify;
color : #000000;
margin : 0px;
orphans:5;
widows:5;
}

p.Body {
text-indent : 1.5em;
}

p.BodyFirst {
text-indent : 0px;
}

p.BodySpace {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
p.GebetSpace {
font-weight: normal;
font-style: italic;
margin-top: 0.5em;
margin-bottom: 0.5em;
}

p.GebetBody {
font-weight: normal;
font-style: italic;
text-indent: 1.5em;
margin-top: -0.5em;
margin-bottom: 0.5em;
}

p.BodySpace2 {
text-indent: -1.5em;
margin-left: 1.5em;
margin-top: 0.5em;
margin-bottom: 0.5em;
}

p.Subhead1 {
font-size : 1.4em;
font-weight : bold;
text-align : center;
margin-bottom : 0.8em;
margin-top : 1.5em;
page-break-after:avoid;
}

p.Subhead2 {
font-size : 1.2em;
font-weight : normal;
font-style: italic
text-align : center;
margin-bottom : 0.8em;
margin-top : 1.5em;
page-break-after:avoid;
}

p.S4_Impressum {
font-size: 0.75em;
}

p.footnote {
text-indent: -0.5em;
margin-left: 0.5em;
}

p.Ding {
text-align: center;
margin-top: 1.5em;
margin-bottom: 1.5em;
font-weight: bold;
}

h3.Subhead1ZuA {
font-family : "Tinos", serif;
font-size : 1.2em;
font-weight : bold;
font-style : normal;
text-decoration : none;
text-align : center;
font-variant : normal;
line-height : 1.3;
color : #000000;
margin-bottom : 0.8em;
margin-top: 0.2em;
page-break-after:avoid;
}

h2.Kapitelhead {
font-family : "Tinos", serif;
font-weight : bold;
font-style : normal;
font-size : 1.5em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : center;
color : #000000;
margin-bottom: 1em;
page-break-after:avoid;
}

h1.Kapitelhead {
font-family : "Tinos", serif;
font-weight : bold;
font-style : normal;
font-size : 1.5em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : center;
color : #000000;
margin-bottom: 1em;
}

h1.TeilZahl {
font-family : "Tinos", serif;
font-weight : normal;
font-style : normal;
font-size : 1.5em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : center;
color : #000000;
margin-bottom: 1.5em;
margin-top: 5em;
}

h1.Teiltitel {
font-family : "Tinos", serif;
font-weight : bold;
font-style : normal;
font-size : 1.8em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : center;
color : #000000;
margin: 0px;
}

span.kapitel {
font-family: serif;
font-size : 0.8em;
font-variant : small-caps;
}

span.stickout {
margin-left: 1.5em;
}

span.fnnr {
font-size: 0.7em;
vertical-align: top;
}

span.bolditalic {
font-weight: bold;
font-style: italic;
}

a {
text-decoration: none;
}

b {
font-weight: bold;
}

i, em {
font-style: italic;
}

ul {
font-family : "Tinos", serif;
font-weight : normal;
font-style : normal;
font-size : 1em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : justify;
color : #000000;
margin-left: 1.5em;
}

li {
font-family : "Tinos", serif;
font-weight : normal;
font-style : normal;
font-size : 1em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : justify;
color : #000000;
margin-left: 0px;
}

hr {
margin-top: 1.5em;
margin-bottom: 1em;
}

div.zitatbox {
font-family : "Tinos", serif;
font-weight : normal;
font-style : italic;
font-size : 0.9em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : left;
color : #000000;
float: left;
margin-left : 0px;
margin-top: 1em;
padding-top: 0.8em;
margin-right: 1em;
margin-bottom: 1em;
padding-bottom: 0.8em;
width: 30%;
border-top-width: 1.5px;
border-top-style: solid;
border-bottom-width: 1.5px;
border-bottom-style: solid;
vertical-align: middle;
page-break-before: auto;
}

div.zitatbox2 {
font-family : "Tinos", serif;
font-weight : normal;
font-style : italic;
font-size : 0.9em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : left;
color : #000000;
float: right;
margin-left : 1em;
margin-top: 1em;
padding-top: 0.8em;
margin-right: 0px;
margin-bottom: 1em;
padding-bottom: 0.8em;
width: 30%;
border-top-width: 1.5px;
border-top-style: solid;
border-bottom-width: 1.5px;
border-bottom-style: solid;
vertical-align: middle;
page-break-before: auto;
}

div.meyer_foto {
text-align : left;
float: right;
margin-left : 5px;
width: 35%;
vertical-align: top;
page-break-inside: avoid;
}

table {
page-break-inside: avoid;
margin-bottom: 1.5em;
}

td.cover {
vertical-align: top;
padding-right: 10px;
}

td.text {
font-family : "Tinos", serif;
font-weight : normal;
font-style : normal;
font-size : 1em;
text-decoration : none;
font-variant : normal;
line-height : 1.3;
text-align : justify;
color : #000000;
margin : 0px;
}

DiapDealer
12-09-2012, 04:26 PM
I can't really imagine how to change p.Subhead2 to validate. Same with the error on line 81.

p.Subhead2 {
font-size : 1.2em;
font-weight : normal;
font-style: italic
text-align : center;
margin-bottom : 0.8em;
margin-top : 1.5em;
page-break-after:avoid;
}

Missing a semicolon after "font-style: italic" in p.Subhead2.

Doitsu
12-09-2012, 04:27 PM
There's a missing semicolon after font-style: italic in the p.Subhead2 declaration.

As usual, DiapDealer beat me to it by one minute. :-)

DiapDealer
12-09-2012, 04:30 PM
As usual, DiapDealer beat me to it by one minute. :-)
Let's call it an assist. ;)

dasboeh
12-10-2012, 03:25 AM
Thanks a lot! BOTH of you! ;-)