View Single Post
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:	200
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