![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
|
![]()
I have searched through the site in hopes of finding something similar to my problem and I have but just not my exact type of error, and what I did read I did not know how to apply it so here is my first of many errors.
attribute 'align' is not declared for element 'p' Code:
<p align="center"><b>INTRODUCTION</b></p> attribute 'align' is not declared for element 'img' attribute 'border' is not declared for element 'img' attribute 'border' is not declared for element 'img' Code:
<p align="center"><img align="bottom" alt="" border="1%" height="0" id="image003" src="../Images/line.jpg" width="80%" /></p> no declaration found for element 'u' Code:
<h2 id="chapter01" style="text-align: center;"><u>PART ONE</u></h2> Under each error is the corresponding code. The second code has three |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It's not the p tag it's barking about, it's the 'align' attribute. In all the examples you listed (with exception of the last one), it's those attributes that are invalid for the xhtml requirements of the epub.
The align="xxxx" either needs to be moved to CSS (either inline or external) using the text-align property. Or if you insist on styling within the tag itself, you'll have to use something like: Code:
<p style="text-align:center;">Text to be centered</p> In the css file: Code:
span.underlined { text-decoration: underline; } Code:
<p>Some text needs to be <span class="underlined">underlined</span>.</p> Code:
<p>Some text needs to be <span style="text-decoration:underline;">underlined</span>.</p> Last edited by DiapDealer; 04-06-2015 at 10:24 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,174
Karma: 144286760
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
When validating your ePub, don't use FlightCrew (if that's what you've used). Use epubcheck as FlightCrew misses too many errors that epubcheck gets.
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Which answers actually zero of the questions that the poster actually asked. The validator used has absolutely no bearing whatsoever in this particular instance. Bringing it up only adds to the OP's confusion.
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
|
Thanks.
Lol and I used FlightCrew and I have enough errors already as it is. When you say the align="xxxx" needs be moved inline or externally to the CSS, what does that mean exactly? You also mention "styling within the tag itself" doesn't the CSS take care of all the styling? Like the way I understood it to be was that the CSS is where you set all the styles for the way the text should appear. Here is my CSS just to give you more insight Code:
p { margin-top:0.0em; margin-bottom:0.0em; text-indent:1.5em; text-align:justify; } p.first { margin-top:0.5em; margin-bottom: 0.0em; text-indent:0.0em; text-align:justify; } p.left { margin-top:0.5em; margin-bottom: 0.0em; text-indent:0.0em; text-align:left; } p.center { margin-top:0.0em; margin-bottom:0.25em; text-indent:0.0em; text-align:center; } h2 { margin-top:1em; font-size: 150%; text-indent: 0em; font-style: italic; text-align:center; } h3 { margin-top:1em; font-size: 125%; text-indent: 0em; text-align:center; } h4 { margin-top:1em; font-size: 125%; text-indent: 0em; text-align:left; } p.large { font-weight: bold; margin-top:1em; margin-bottom:1em; font-size: 200%; font-style: italic; text-indent: 0em; text-align:center; } p.medium { font-weight: bold; font-size: 150%; font-style: italic; margin-top:1.0em; margin-bottom:1.0em; text-indent: 0em; text-align:center; } p.small { font-weight: bold; margin-bottom:1em; font-size: 125%; text-indent: 0em; text-align:center; } p.block { font-family: courier, monospace; text-indent: 1em; text-align:left; margin:0em 0em 0em 1em; } p.blockfirst { font-family: courier, monospace; text-indent: 1em; text-align:left; margin:0.5em 0em 0em 1em; } p.blockcenter { font-family: courier, monospace; text-align:center; margin:0.5em 0em 0em 1em; } span.smallcap { font-size: 90%; font-weight: bold; } div.image { text-align:center; margin-bottom: 0.25em; } div.icon { text-align:center; margin-bottom: 1em; } div.caption { margin-bottom: 1em; text-align:center; font-style:italic; } |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You have already have a class: p.centered . Why did you not use it?
![]() <p class="centered"> instead of what you did ![]() |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 86
Karma: 118402
Join Date: Jul 2009
Device: Cybook Gen3
|
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
|
Okay I know what happened, the inevitable, I ran my doc through a code cleaner and have just been copying and pasting all the way through to the end disregarding my css.
|
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,174
Karma: 144286760
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I know it doesn't help with the existing errors, but it might find more errors that will need to be fixed.
|
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() @O.P. As theducks said: if you already had css for centered text, then you should use that class where you want your text centered, and remove the align="center" attributes to make the "align not declared for element p" errors go away. It CAN be. And it's often the most efficient and quickly modifiable way to do it. But if you have your css already set up to format your text the way you want it, then why do you also have align="center" in your (x)html? Last edited by DiapDealer; 04-06-2015 at 01:50 PM. |
|
![]() |
![]() |
![]() |
#11 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Oliver, your basic problem is piling in-line styles on top of the style sheet. See Diap's first reply for the way out of the wilderness. Instead of
<p align="center"><b>INTRODUCTION</b></p> You can use <p class="center"><b>INTRODUCTION</b></p> and get the exact result you are seeking. p class calls upon the appropriate paragraph style in the style sheet. However, I probably would have used: <h2>Introduction</h2> instead. If you refer to the style sheet, you'll see that that would yield a centered and italicized (and effectively boldfaced) heading half again as large as the body text, which IMHO is more desirable than all caps. Or if you want a smaller heading, you could substitute h3. Last edited by Notjohn; 04-07-2015 at 05:56 AM. |
![]() |
![]() |
![]() |
#12 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
There is a second advantage to using: <h2 class="optional">Introduction</h2>
Sigils TOC generator uses H# (the # is the relative nesting level) The class is optional. It can be used to set spacing, colors or font size & face Unlearn using H#'s just for size, re-style as needed ![]() |
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 120648
Join Date: Feb 2015
Device: kindle
|
I have done as thou has commanded.
I put this code in Code:
<p class="center"><b>INTRODUCTION</b></p> Code:
<p class="center" style="text-align: center;"><b>INTRODUCTION</b></p> To give more insight: http://postimg.org/image/bkyw7tm7t/ http://postimg.org/image/f5urr1qrd/ http://postimg.org/image/l48l1a9q1/ http://postimg.org/image/nkaef4rsp/ |
![]() |
![]() |
![]() |
#14 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You can call a class anything (there are some allowed character rules)
class="fred" .fred {text-align: right; } /* fred is a right winger ![]() some publishers use short names ![]() .CN chapter Number .CT chapter Title .CO or .FP first paragraph |
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,309
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I think you need to get a basic understanding of HTML and CSS.
Take a read through Pablo's My Quick and Dirty ePub Tutorial. (While it covers an older version of Sigil, the basics are still applicable). |
![]() |
![]() |
![]() |
Tags |
proofread, validator error |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clean conversion BUT many errors in Epub Validator | Peerie | Conversion | 3 | 12-29-2014 08:28 PM |
Epub Validator Errors for iBooks Producer | tcorsonk | ePub | 0 | 06-11-2014 05:10 PM |
Problems galore | inkedchick | Kobo Tablets | 5 | 09-14-2012 02:32 AM |
Nexus galore | afv011 | Android Devices | 2 | 05-15-2012 10:51 PM |
Unutterably Silly Time of the Season (Rabbits Galore) | RWood | Lounge | 125 | 04-02-2010 04:13 PM |