anchor

How do I combine an anchor tag AND a passed variable in an HTML HREF?

此生再无相见时 提交于 2019-12-03 10:29:35
问题 Say I have an anchor somewhere on a different page: <A NAME="blah"> On the page I'm currently on, I want to go that that anchor on that different page while also passing a GET parameter, such as, for example: <A HREF="otherpage.htm#blah?data=1234">Good Stuff!</A> This doesn't seem to be working for me. It loads the page and passes the variable but doesn't go to the anchor. I've searched for examples on the anchor tag, and there's tons of them, but nobody talks about jumping to an anchor in a

Is there a way to margin an anchor in css?

隐身守侯 提交于 2019-12-03 09:50:48
I have a fixed header height 50px. In my body, I have a lot of anchors. The problem is that, when I click on links pointing to anchors, the anchor appears under my fixed header and I lose 50px of content (I need to scroll up of 50px to read content under the header). Is there a way to margin an anchor of 50px? My body is filled with a lot of box (divs) with a margin between themself, so I can't put in place an empty div of 50px and then anchor after it.. html: <div id="header"></div> <div id="content"> <div class="box" id="n1"></div> <div class="box" id="n2"></div> <div class="box" id="n3"><

Center anchor with image in div

半城伤御伤魂 提交于 2019-12-03 09:02:46
I have an image that's in an anchor element. I want the anchor an the image to be centered both vertically and horizontally in the parent div. Here 's an example: <div class="wrapper"> <a href="#" class="anchor"> <img src="http://bit.ly/1mFH8AW"></img> </a> </div> .wrapper { background: black; width: 500px; height: 500px; } .anchor { } .anchor > img { height: 100px; width: 100px; } Result: Add position:relative to your wrapper and then change the image's CSS to: .anchor > img { height: 100px; width: 100px; position:absolute; margin:auto; top:0;right:0;bottom:0;left:0; } jsFiddle example 来源:

Anchor around table - NOT working in outlook

六眼飞鱼酱① 提交于 2019-12-03 08:41:20
I'm developing a newsletter for Mailchimp with below HTML structure for one of the block - <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center"> <tr> <td valign="top" class="complete-block"> <a href="#" target="_blank"> <table border="0" cellpadding="9" width="100%" align="center" cellspacing="0" class="templateButton display-inline" mc:hideable> <tr> <td align="center" valign="middle" class="templateButtonContent"> Amazon </td> </tr> </table> </a> <a href="#" target="_blank"> <table border="0" cellpadding="9" width="100%" align="center" cellspacing="0" class=

What is meant by the rel=“bookmark” link attribute?

房东的猫 提交于 2019-12-03 08:04:31
问题 What is the purpose of the rel="bookmark" attribute in <a> tags? For example: <a href="http://stackoverflow.com/questions/ask" rel="bookmark">Click Here</a> Does it serve any SEO- or SEM-related purpose? 回答1: This has no SEO value or purpose. I believe the rel=bookmark tag was intended to mark permalinks but it never really gained traction 回答2: An important use of the LINK element is to define a toolbar of navigation buttons or an equivalent mechanism such as menu items. LINK relationship

Alternative to <a href=“#”> when the anchor tag only triggers a jQuery action without redirecting the user?

心不动则不痛 提交于 2019-12-03 07:52:00
I have numerous anchor tags on my page that only trigger jQuery actions on the same page. The don't redirect the user to another location, which is the normal expected behavior of an anchor tag. I don't want to have restful urls in my app for every action. But, I also don't like sending the user to the top of the page every time they click on one of these <a href="#"> tags. What's a better value to put inside the href value of the anchor tag besides # ? Can you reference a fragment on the page that could work as a logical fallback to the non-executed JavaScript action? If so, it makes a lot of

Link to index page of website

℡╲_俬逩灬. 提交于 2019-12-03 05:17:13
Is there a way to link to the index page of a website without specifying the name of the index page or the full website URL? I have this: <a href="index.htm">Home</a> But when I click the link, my address bar shows: mydomain.com/index.html I would like it to show: mydomain.com Can I do that without putting the full URL ( mydomain.com ) in the href ? If so, how? For future viewers, I also found this question helpful. James Allardice You can just do this: <a href="/">Home</a> Any href preceded by a slash is relative the root directory. It should be noted that when viewing a webpage from a local

AngularJS create html/link/anchor from text (escape/unescape html in view)

大城市里の小女人 提交于 2019-12-03 02:58:13
I have a controller that has an assigned value: $scope.post = 'please visit http://stackoverflow.com quickly'; I have some text in my html: <p>{{post}}</p> I would like to make a clickable link of the url (surround it with anchor tags). I tried to change my html to: <p ng-bind-html="post | createAnchors"></p> Here is a simplified example of the problem: http://jsfiddle.net/T3fFt/4/ The question is, how can I escape the whole post text, except for the link, which will be surrounded by anchor tags? ? I think you can use Angular's linky filter for this: https://docs.angularjs.org/api/ngSanitize

jQuery move to anchor location on page load

空扰寡人 提交于 2019-12-03 02:42:06
问题 I have a simple page setup such as: <div id="aboutUs"> About us content... </div> <div id="header"> Header content... </div> When the page loads, I need the page to automatically scroll down (no animation needed) to #header , so the user cannot see the About Us div unless they scroll up. #aboutUs has a fixed height, so there isn't any need for any variables to determine the height or anything... if that's even needed. I came across this other question and tried to modify some of the answers

How do I combine an anchor tag AND a passed variable in an HTML HREF?

时光毁灭记忆、已成空白 提交于 2019-12-03 00:58:01
Say I have an anchor somewhere on a different page: <A NAME="blah"> On the page I'm currently on, I want to go that that anchor on that different page while also passing a GET parameter, such as, for example: <A HREF="otherpage.htm#blah?data=1234">Good Stuff!</A> This doesn't seem to be working for me. It loads the page and passes the variable but doesn't go to the anchor. I've searched for examples on the anchor tag, and there's tons of them, but nobody talks about jumping to an anchor in a page while also passing parameters in the URL. The bookmark always goes last. <A HREF="otherpage.htm