View Single Post
Old 05-02-2013, 11:12 PM   #18
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,195
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by JSWolf View Post
If you want to see an example of really bad code, start with the CSS that really botches things up in this eBook...
Spoiler:

Code:
/**********************************************/
/* Styles for document saved to a stream      */
/* Generated by Aspose.Words for .NET 9.7.0.0 */
/**********************************************/

body { font-family:Calibri, sans-serif; font-size:11pt; line-height:115% }
h1, h2, p { margin:0pt 0pt 10pt }
h1 { color:#000000; font-family:'Times New Roman', serif; font-size:14pt; font-weight:bold; line-height:120%; margin-bottom:40.5pt; orphans:0; text-align:center; widows:0 }
h2 { color:#000000; font-family:'Times New Roman', serif; font-size:13pt; font-weight:normal; line-height:120%; margin-bottom:13.5pt; margin-top:22.5pt; orphans:0; text-align:center; widows:0 }
.BalloonText { font-family:Tahoma, sans-serif; font-size:8pt; line-height:normal; margin-bottom:0pt }
.Chapter { color:#000000; font-family:'Times New Roman', serif; font-size:14pt; font-weight:bold; line-height:120%; margin-bottom:40.5pt; orphans:0; text-align:center; widows:0 }
.Chapter-Sub { color:#000000; font-family:'Times New Roman', serif; font-size:13pt; line-height:120%; margin-bottom:13.5pt; margin-top:22.5pt; orphans:0; text-align:center; widows:0 }
.First { color:#000000; font-family:'Adobe Caslon Pro', serif; font-size:11.5pt; line-height:120%; margin-bottom:0pt; orphans:0; text-align:justify; widows:0 }
.NoSpacing { font-size:11pt; line-height:normal; margin-bottom:0pt }
.Pa4 { font-family:'Times New Roman', serif; font-size:12pt; line-height:11.55pt; margin-bottom:0pt }
.Subtitle { color:#000000; font-family:'Times New Roman', serif; font-size:14pt; font-weight:bold; line-height:120%; margin-bottom:40.5pt; orphans:0; text-align:center; widows:0 }
.BasicParagraph { color:#000000; font-family:'Adobe Caslon Pro', serif; font-size:11.5pt; line-height:120%; margin-bottom:0pt; orphans:0; text-align:justify; text-indent:14.4pt; widows:0 }
.NoParagraphStyle { color:#000000; font-family:'Minion Pro', serif; font-size:12pt; line-height:120%; margin-bottom:0pt; orphans:0; widows:0 }
.copyrightpagez { color:#000000; font-family:'Times New Roman', serif; font-size:8pt; line-height:9pt; margin-bottom:0pt; orphans:2; text-align:justify; widows:2 }
span.A6 { color:#221e1f; font-size:8pt }
span.BalloonTextChar { font-family:Tahoma, sans-serif; font-size:8pt }
span.First1 { font-variant:small-caps }
span.Heading1Char { color:#000000; font-family:'Times New Roman', serif; font-size:14pt; font-weight:bold }
span.Heading2Char { color:#000000; font-family:'Times New Roman', serif; font-size:13pt }
span.Hyperlink { color:#0000ff; text-decoration:underline }
span.SubtitleChar { color:#000000; font-family:'Times New Roman', serif; font-size:14pt; font-weight:bold }
Spoiler:

Code:
    <h1 id="navPoint_1"><span>COMPUTER</span> <span>VIRUS</span></h1>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">“</span><span style="font-family:'Times New Roman', serif; font-style:italic">It’s out, someone said, a tech probably, although later McTaggart could never remember who spoke first. “It’s out!”</span></p>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">“</span><span style="font-family:'Times New Roman', serif; font-style:italic">It can’t be!” someone else cried, and then the whole room was roiling, running, frantic with activity that never left the workstations.</span> <span style="font-family:'Times New Roman', serif; font-style:italic">Running in place.</span></p>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">&nbsp;</span></p>

    <p class="First"><span style="font-family:'Times New Roman', serif">“It’s not supposed to be this way,” Elya blurted. Instantly she regretted it. The hard, flat eyes of her sister-in-law Cassie met hers, and Elya flinched away from that look.</span></p>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">“And how is it supposed to be, Elya?” Cassie said. “Tell me.”</span></p>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">“I’m sorry. I only meant that…that no matter how much you loved Vlad, mourning gets…lighter. Not lighter, but less…withdrawn. Cass, you can’t just wall up yourself and the kids in this place! For one thing, it’s not good for them. You’ll make them terrified to face real life.”</span></p>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">“I hope so,” Cassie said, “for their sake. Now let me show you the rest of the castle.”</span></p>

    <p class="BasicParagraph"><span style="font-family:'Times New Roman', serif">Cassie was being ironic, Elya thought miserably, but “castle” was still the right word. Fortress, keep, bast</span><span style="font-family:'Times New Roman', serif">i</span><span style="font-family:'Times New Roman', serif">on…Elya hated it. Vlad would have hated it. And now she’d provoked Cassie to exaggerate every protective, self-sufficient, isolating feature of the multi-million-dollar pile that had cost Cass every penny she had, including the future income from the lucrative patents that had gotten</span> <span style="font-family:'Times New Roman', serif">Vlad murdered.</span></p>


Unless you don't mind diving into the code (in this case, akin to dumpster diving) go for it. Otherwise, stay away.
Less than two minutes in a text editor and this is the result.

Spoiler:

Code:
/**********************************************/
/* Styles for document saved to a stream      */
/* Generated by Aspose.Words for .NET 9.7.0.0 */
/**********************************************/


body { font-family:Calibri, sans-serif;
     font-size:11pt;
     line-height:115%
     }
h1, h2, p { margin:0pt 0pt 10pt
     }
h1 { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:14pt;
     font-weight:bold;
     line-height:120%;
     margin-bottom:40.5pt;
     orphans:0;
     text-align:center;
     widows:0
     }
h2 { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:13pt;
     font-weight:normal;
     line-height:120%;
     margin-bottom:13.5pt;
     margin-top:22.5pt;
     orphans:0;
     text-align:center;
     widows:0
     }
.BalloonText { font-family:Tahoma, sans-serif;
     font-size:8pt;
     line-height:normal;
     margin-bottom:0pt
     }
.Chapter { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:14pt;
     font-weight:bold;
     line-height:120%;
     margin-bottom:40.5pt;
     orphans:0;
     text-align:center;
     widows:0
     }
.Chapter-Sub { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:13pt;
     line-height:120%;
     margin-bottom:13.5pt;
     margin-top:22.5pt;
     orphans:0;
     text-align:center;
     widows:0
     }
.First { color:#000000;
     font-family:'Adobe Caslon Pro', serif;
     font-size:11.5pt;
     line-height:120%;
     margin-bottom:0pt;
     orphans:0;
     text-align:justify;
     widows:0
     }
.NoSpacing { font-size:11pt;
     line-height:normal;
     margin-bottom:0pt
     }
.Pa4 { font-family:'Times New Roman', serif;
     font-size:12pt;
     line-height:11.55pt;
     margin-bottom:0pt
     }
.Subtitle { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:14pt;
     font-weight:bold;
     line-height:120%;
     margin-bottom:40.5pt;
     orphans:0;
     text-align:center;
     widows:0
     }
.BasicParagraph { color:#000000;
     font-family:'Adobe Caslon Pro', serif;
     font-size:11.5pt;
     line-height:120%;
     margin-bottom:0pt;
     orphans:0;
     text-align:justify;
     text-indent:14.4pt;
     widows:0
     }
.NoParagraphStyle { color:#000000;
     font-family:'Minion Pro', serif;
     font-size:12pt;
     line-height:120%;
     margin-bottom:0pt;
     orphans:0;
     widows:0
     }
.copyrightpagez { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:8pt;
     line-height:9pt;
     margin-bottom:0pt;
     orphans:2;
     text-align:justify;
     widows:2
     }
span.A6 { color:#221e1f;
     font-size:8pt
     }
span.BalloonTextChar { font-family:Tahoma, sans-serif;
     font-size:8pt
     }
span.First1 { font-variant:small-caps
     }
span.Heading1Char { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:14pt;
     font-weight:bold
     }
span.Heading2Char { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:13pt
     }
span.Hyperlink { color:#0000ff;
     text-decoration:underline
     }
span.SubtitleChar { color:#000000;
     font-family:'Times New Roman', serif;
     font-size:14pt;
     font-weight:bold 
     }


Not the best css but also not the worst I have seen.

YMMV.

bernie
gbm is offline