Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-17-2021, 08:29 AM   #1
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
Sigil div tag issue HELP

HI there I have just completed an ebook which is fine. . . until I put in about 6 url links on a few social media images at the back. sure its resolved simply though.

The error is on line 138 where the says: Error while parsing file: element "div" not allowed here; expected element (screen shot attached)

also attached is screen for line 138 in sigil. what do I change. the same error is repeated so once I solve this I can correct the rest. what do I delete or replace??

thanks for you help .

David
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2021-05-17 at 13.17.13.png
Views:	242
Size:	54.9 KB
ID:	187168   Click image for larger version

Name:	Screen Shot 2021-05-17 at 13.17.33.png
Views:	259
Size:	69.6 KB
ID:	187169  
ebookscovers is offline   Reply With Quote
Old 05-17-2021, 08:59 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You can't nest div or p tags inside of a tags to my knowledge.
DiapDealer is offline   Reply With Quote
Advert
Old 05-17-2021, 09:23 AM   #3
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
You want your <div>s and <p>s on the outside + your <img>s and <a>s on the inside:

Code:
<div class="social"><img alt="" src="../Images/instagram.jpg"/></div>
<p><a href="https://www.instagram.com/example">https://www.instagram.com/example</a></p>

<div class="social"><img alt="" src="../Images/twitter.jpg"/></div>
<p><a href="https://www.twitter.com/example">@example</a></p>
Tex2002ans is offline   Reply With Quote
Old 05-17-2021, 10:17 AM   #4
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
thanks for that and I do understand what you are saying and I've tried it but obviously missing something my end.

can you let me know exactly how this should read and I can repair the others? this is how each one is laid out as follows:

<a href="https://twitter.com/UnknownOrigins9"><div id="box5"><p class="figure"><img src="../Images/twit.jpg" width="560" height="67" alt="twit.jpg"/></p>
</div></a>

IS THIS BELOW CORRECT because I lose the URL and doesn't work:
<div class="figure"><img src="../Images/twit.jpg" width="560" height="67" alt="twit.jpg"/></div>
<p><a href="https://twitter.com/UnknownOrigins9"><div id="box5"</a></p>
ebookscovers is offline   Reply With Quote
Old 05-17-2021, 11:45 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If you're trying to make the image an actual link, then that's fairly hit-or-miss when it comes to working properly across a range of devices/apps. That's probably why you "lose the URL and doesn't work". Especially if you're testing on something that uses Adobe's RMSDK for rendering.

Many devices provide some sort of pan and zoom functionality with images that wouldn't work if tapping on an image were to follow a link instead.

You're better off using text for the link and adding the image separately.

Quote:
Originally Posted by ebookscovers View Post
IS THIS BELOW CORRECT because I lose the URL and doesn't work:
<div class="figure"><img src="../Images/twit.jpg" width="560" height="67" alt="twit.jpg"/></div>
<p><a href="https://twitter.com/UnknownOrigins9"><div id="box5"</a></p>
You lose the link because there's nothing between the opening 'a' tag and the closing 'a' tag to BE the link. There also still seems to be some syntax errors in general with that snippet.

Sigil doesn't appear to be related to the issue here. You seem to need to do a little brushing up on html in general.

Last edited by DiapDealer; 05-17-2021 at 11:51 AM.
DiapDealer is offline   Reply With Quote
Advert
Old 05-17-2021, 11:57 AM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by ebookscovers View Post
can you let me know exactly how this should read:
You can't do the part in red:

Code:
<a href="https://twitter.com/UnknownOrigins9"><div id="box5"><p class="figure"><img src="../Images/twit.jpg" width="560" height="67" alt="twit.jpg"/></p>
</div></a>
You have to stick <div> on the outside, then <p>, then <a>:

Code:
<div id="box5">
  <p class="figure"><a href="https://twitter.com/UnknownOrigins9"><img src="../Images/twit.jpg" width="560" height="67" alt=""/></a></p>
</div>
Let me simplify + indent so it may make more sense:

Code:
<div class="box5">
  <p class="figure">
    <a href="LinkGoesHere">
      <img src="../Images/twit.jpg" alt=""/>
    </a>
  </p>
</div>
Do you see how each thing goes inside the other... like a Russian nesting doll?

Click image for larger version

Name:	Nesting.Dolls.jpeg
Views:	197
Size:	290.9 KB
ID:	187177

What you're currently doing is opening and closing the <div>s + <p>s + <a>s all out of order!

Side Note: In ebooks, it's also not a good idea to put the link around an image. It won't work on many ereaders. Better to have actual text to click on:

Code:
[Blah blah blah, stick your image code here.]

<p class="social"><a href="http://TwitterURLGoesHere">Visible Text Goes Here</a></p>
Quote:
Originally Posted by ebookscovers View Post
IS THIS BELOW CORRECT because I lose the URL and doesn't work:
<div class="figure"><img src="../Images/twit.jpg" width="560" height="67" alt="twit.jpg"/></div>
<p><a href="https://twitter.com/UnknownOrigins9"><div id="box5"</a></p>
No. Your <p> is still wrong.

You see the broken <div>? Plus the <div> cannot go inside of a <p>.

Last edited by Tex2002ans; 05-17-2021 at 12:00 PM.
Tex2002ans is offline   Reply With Quote
Old 05-17-2021, 01:17 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,168
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
My preference where it is desired to attempt to make an image clickable is to insert the link twice. Once for the image and again using a text line below the image.

Code:
  <div class="box5">
    <p class="figure"><a href="https://www.google.ca"> <img src="../Images/twit.jpg" alt=""/> </a></p>

    <p class="center"><a href="https://www.google.ca">This is a clickable link</a></p>
  </div>
DNSB is online now   Reply With Quote
Old 05-17-2021, 02:14 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
My preference where it is desired to attempt to make an image clickable is to insert the link twice. Once for the image and again using a text line below the image.

Code:
  <div class="box5">
    <p class="figure"><a href="https://www.google.ca"> <img src="../Images/twit.jpg" alt=""/> </a></p>

    <p class="center"><a href="https://www.google.ca">This is a clickable link</a></p>
  </div>
That is a very good idea.
JSWolf is offline   Reply With Quote
Old 05-18-2021, 12:01 PM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by DNSB View Post
My preference where it is desired to attempt to make an image clickable is to insert the link twice. Once for the image and again using a text line below the image.

Code:
  <div class="box5">
    <p class="figure"><a href="https://www.google.ca"> <img src="../Images/twit.jpg" alt=""/> </a></p>

    <p class="center"><a href="https://www.google.ca">This is a clickable link</a></p>
  </div>
What happens on those devices that have image zoom feature, as mentioned above? Does that break the zoom functionality, or does the link just not work??
Turtle91 is offline   Reply With Quote
Old 05-18-2021, 12:29 PM   #10
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,168
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Turtle91 View Post
What happens on those devices that have image zoom feature, as mentioned above? Does that break the zoom functionality, or does the link just not work??
In my limited testing, the image zooms which is why I add the text link. At least one of them will work.
DNSB is online now   Reply With Quote
Old 05-18-2021, 06:30 PM   #11
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Turtle91 View Post
What happens on those devices that have image zoom feature, as mentioned above? Does that break the zoom functionality, or does the link just not work??
Both can happen:

Older versions of ADE won't make the linked image clickable at all. So if you include the link ONLY around the image, people won't be able to get to it.

This is why you should always have human-readable URLs nearby, so readers can type the information in:

Code:
<p>Find me in these places:</p>

[Website's logo code]    <--- Clickable image code optional.

<p><a href="http://example.com">www.example.com</a></p>
<p><a href="http://SocialMedia.com/example">SocialMedia.com/example</a></p>
On devices with zoom functionality, your "clickable image" may interfere + break zoom.

A user may click on it, trying to expand the image in order to pan/scan (or some other visual impairment reason). Instead, the browser will open or they'll unexpectedly jump to another location in the book.

So never use the link around an important image within the book, like a map.

For more information, see a few of the previous topics:

2019: "problems making an image a hyperlink in epub"

2014: "Link from an image to a YouTube video"


Also, a few reasons why clickable images work a little better on the computer is because you have:
  • Mouse hover (you can see the mouse pointer change + see where a URL will point to)
  • Right-click to override and open the image directly.

On ebooks, no such thing on most/(all?) devices.

And also remember: If you ever create a physical print version of the book... there's no such thing as clickable images... so you'll likely have to place that human-readable fallback anyway!

Last edited by Tex2002ans; 05-18-2021 at 06:42 PM.
Tex2002ans is offline   Reply With Quote
Old 05-19-2021, 02:04 PM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Interesting...

It seems like putting the link around the actual address is good, but putting it around the image could either do nothing, or potentially break the book/device functionality, and should be avoided.

Thanks!
Turtle91 is offline   Reply With Quote
Old 06-02-2021, 09:48 AM   #13
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Turtle91 View Post
Interesting...

It seems like putting the link around the actual address is good, but putting it around the image could either do nothing, or potentially break the book/device functionality, and should be avoided.

Thanks!
On Kindles, the reality is that the user doesn't know it's a link and the first action upon being clicked, is that the image zooms.

We deal with this near-daily, with customers INSISTING that the bloody images "must be" clickable links. It doesn't matter if we explain that the tap initial action is zooming; that the user has no way to know it's a clickable link, OR that most Kindles in the eInk category don't have viable browsers. (Don't get me started about links to videos, ditto.)

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding the div levels in Sigil RSoldin Sigil 12 01-11-2019 03:29 AM
Sigil issue or iBooks issue? Tisha4870 Sigil 17 03-07-2014 07:29 PM
heading tag with sigil 0.7.4 bobcdy Sigil 3 01-12-2014 12:45 PM
PDOC tag in Sigil? Derek R Sigil 5 03-09-2013 12:39 PM
sigil "condensation" of nested <div>'s bobb40 Sigil 5 03-21-2012 07:42 PM


All times are GMT -4. The time now is 05:30 AM.


MobileRead.com is a privately owned, operated and funded community.