![]() |
#1 |
Colonel Mustard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
FlightCrew Validation Question
Hi MobileRead forum,
I'm trying to validate an ePub file I've been working on and I have two problems when checking with FlightCrew. First, with images, FlightCrew tells me that "attribute 'align' is not declared for element 'img'" on line 12 of a certain file. But here is the line in question: <img align="absbottom" alt="Jigai01.tif" src="../Images/Jigai01.jpg" /> The attribute 'align' is declared, so what is the problem? Second thing, very similar, in a table. FlightCrew tells me repeatedly that "attribute 'width' is not declared for element 'td'". But again, 'width' attribute is declared in the file, like this: Code:
<table border="0" cellpadding="1" cellspacing="0" width="100%"> <tr> <td align="right" valign="top" width="5%"><span class="sgc-3">1</span></td> <td width="3%"> </td> <td align="left" width="92%"><span class="sgc-3">text text text</span></td> </tr> </table> Thanks in advance, Michael |
![]() |
![]() |
![]() |
#2 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
align is not a valid attribute for the img element in XHTML 1.1. Which is what FlightCrew meant by it not being defined (it's not in the list of valid things).
Similarly width is not a valid attribute for td in XHTML 1.1 You can see what you can and cant do with various elements either by reading the spec (It's what I do - but I'm beyond warped - http://www.w3.org/TR/xhtml-modulariz...dule_defs.html ) Or you can look at a site such w3schools and remember that XHTML 1.1 is 'Strict' http://www.w3schools.com/tags/tag_img.asp (for the img tag) http://www.w3schools.com/tags/tag_td.asp (for the td tag) (Look at the DTD it'll says either STF or TF - if it doesn't have the S there, then you can't use it). Last edited by Jim Lester; 10-09-2011 at 01:57 AM. Reason: added links to w3schools |
![]() |
![]() |
![]() |
#3 |
Colonel Mustard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
Oh, I see. Thanks. Well, I was exactly afraid of this. Surely there must be some way to adjust the width of columns in a table in ePub? On the w3schools page for td, they say "width" is deprecated, and to use styles instead. I must admit I'm a bit lost here. How do I set this with styles? If I just set the td width in my CSS instead of right in the file, it will be the same problem, no?
Will have to test in the morning. But sleep first. Thanks again for the help! |
![]() |
![]() |
![]() |
#4 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,542
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
<td width="3%"> is using the "width" HTML attribute, and it is wrong. <td style="width: 3%"> is using the "width" CSS property, and it is fine. Whether the latter will do what you want depends on the spec and implementation particulars. Also, you can move it from the "style" attribute to your CSS stylesheet. |
|
![]() |
![]() |
![]() |
#5 |
Colonel Mustard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
OK, thanks for the explanation. So that's one problem fixed. About the align attribute of the img tag, though, it doesn't seem possible to use the same strategy. When I use, say, this:
Code:
<h1 class="titre-nouvelle" id="toc-anchor"><span><img style="align: absbottom;" alt="Jigai01.tif" src="../Images/Jigai01.jpg" /><img style="align: absbottom;" alt="Jigai02.tif" src="../Images/Jigai02.jpg" /> (Jigai)</span></h1> For example here is a screenshot of what it looked like with align="absbottom"... ![]() It wasn't perfect but still much better. Here is what it looks like without the align attribute: ![]() So, last question, how can I align the image and text without using the align attribute? There must be a way. Thanks again for all the help. Much appreciated. |
![]() |
![]() |
![]() |
#6 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,542
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 | |
Colonel Mustard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is this a FlightCrew bug? | JSWolf | Sigil | 5 | 10-04-2011 04:01 AM |
Flightcrew validation error | Jellby | Sigil | 6 | 09-01-2011 08:20 AM |
Bug in FlightCrew | JSWolf | Sigil | 11 | 07-30-2011 04:12 AM |
Epub validation question | Baltic Gal | ePub | 18 | 06-11-2011 05:49 PM |
Question about validation and items referenced in css | ldolse | Sigil | 9 | 02-02-2011 04:17 AM |