3

I have a problem, when i try to click a div it cannot redirect.

<div class="blockquote-box  blockquote-success clearfix">

<div class="square pull-left ui-draggable ui-draggable-handle">
    <img class="Width_40" src="Allbill.png" alt="">
    <span class="fa fa-heart fav-link FontSize-18" title="" data-original-title="Add to My Favorites"></span>
</div>
<a href="/customer/customerbilldetails">
    <h4>
        Bill Listing
    </h4>

    <p>
        Report listing bill details.
    </p>
</a>

I am using a tag. Inside the tag having the all elements, enter image description here

when i right click mouse not show the open in new tab menu... how can i resolve this ...please anyone help.

Sankar
  • 1,272
  • 2
  • 19
  • 31

1 Answers1

6

The "Open New Tab" an other similar options only appear for links (<a>). You must place everything in an <a>. Technically, it will break the "No block elements inside inline elements" rule. However, you can style <a> to have display:block so it acts like a <div>.

A similar situation here: A clickable <li> using an <a> tag - no JS to be used. Is it legal HTML?

Community
  • 1
  • 1
Joseph
  • 117,725
  • 30
  • 181
  • 234
  • 2
    This answer is misleading. HTML5 allows for this. "The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g. buttons or other links)" http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element – MikeSmithDev Sep 05 '14 at 10:23
  • Scroll click is working but right click the mouse and click new tab is not available.. – Sankar Oct 28 '14 at 05:35