I have an anchor that covers various elements, because it makes it friendly and valid HTML5:
& lt; A href = "whatever.html" & gt; & Lt; H2 & gt; Title & lt; / H2 & gt; & Lt; P & gt; Article & lt; / P & gt; & Lt; / A & gt; Now, I want to add the tweet button to this anchor. However, nesting anchors are invalid in html5 so it will provide Twitter infrared outside the anchor:
And if I change the markup to say something like this then this button will not render:
& lt; A href = "whatever.html" & gt; & Lt; H2 & gt; Title & lt; / H2 & gt; & Lt; P & gt; Article & lt; / P & gt; & Lt; Div class = "twitter-share-button" & gt; ... & lt; / Div & gt; & Lt; / A & gt; The button works fine like Facebook because it does not require an anchor element to work. Anyone have an alternative solution for Twitter? Finally I put this out of the very anchor and cut it badly by using it:
Full status, like ...
& lt; Div class = "module" & gt; & Lt; A href = "whatever.html" & gt; & Lt; H2 & gt; Title & lt; / H2 & gt; & Lt; P & gt; Article & lt; / P & gt; & Lt; / A & gt; & Lt; A href = "https://twitter.com/share" class = "twitter-share-button" & gt; ... & lt; / A & gt; & Lt; / Div & gt; . Module {status: relative; } .ttt-share-button {status: complete; Bottom: 0; } But I'm still interested in an alternative solution.
Comments
Post a Comment