anchor

target=“_blank” opens a new window in IE9, instead of a new tab

人盡茶涼 提交于 2019-11-30 11:16:01
In my link, I have target="_blank" attribute, and it works in Chrome, Firefox, Opera, and of course, Safari and opens the link a new TAB . But When I click on it, in IE9 (and IE8) it opens a new window instead of being opened in a new tab. What should I do? HTML and JavaScript provide no means to say if a new "window" should be a full window, or a tab, or whatever you want to call the Mobile Safari multiple views interface. So you live with it. VAShhh You can see in this question that the target="_blank" is correct, but the way the browser handles this case is up to his settings. You need to

When to use target=“_self”

两盒软妹~` 提交于 2019-11-30 10:55:09
When does the _self frame target becomes useful or worth using it? Isn't it ( always? ) the default behavior? The default can be changed by using the <base> tag in the <head> : <base href="http://www.mysite.com/" target="_blank"/> In this case, you can use target="_self" on a link to override the target set by base . parxier _self target value could also be useful in conjunction with AngularJS's HTML5 location mode when you do need to force full page reload for links with the same base as your single page app. https://docs.angularjs.org/guide/$location#html-link-rewriting In cases like the

Disable color change of anchor tag when visited

痴心易碎 提交于 2019-11-30 10:25:15
问题 I have to disable the color change of an anchor tag when visited. I did this: a:visited{ color: gray } (The link is gray in color before visited.) But this is a way where I explicitly state the color after the link is visited, which is again a color change. How can I disable the color change of an anchor tag when visited without doing any explicit color changes? 回答1: You can't. You can only style the visited state. For other people who find this, make sure that you have them in the right

Is there any way to bookmark or link to a section of a page without an anchor?

烈酒焚心 提交于 2019-11-30 06:37:02
问题 Is there any way to bookmark or link to an HTML page (which I am not author of) without having an anchor in the html code ? I want the page to get scrolled down to a particular section when accessed from a bookmark or hyperlink even if there is no anchor tag in the destination page. Note : the destination page has an anchor tag as "foo" then bookmark like http:/...hello.html#foo will not only take the user to hello.html but also automatically scroll down to the section of the page so that the

Numbered anchors in doxygen

﹥>﹥吖頭↗ 提交于 2019-11-30 05:07:54
问题 I have quite a lot of anchors to picture in doxygen, e.g. \anchor pic_foo \image html foo.gif "My Caption" \anchor pic_bar \image html bar.gif "My Caption" Everytime when I use \ref to link one of those, I have to make up some nice description so the raw name of the anchor doesn't appear in output. Is it possible to have something like numbered anchors in doxygen where the link text will be the number of that anchor? Ideally something like: \anchor pic_foo \image html foo.gif "My Caption"

WebView jump to anchor using loadDataWithBaseUrl

ε祈祈猫儿з 提交于 2019-11-30 04:56:35
问题 My Android app uses a WebView to display a bunch of HTML code that I generate 'on the fly'. The HTML code is loaded using the following code: StringBuilder builder = new StringBuilder(); // HTML builder.append("<html><head><link rel=\"stylesheet\" href=\"file:///android_asset/style.css\" type=\"text/css\">"); builder.append("</link></head><body>"); builder.append(getThreadBody()); builder.append("</body></html>"); webview.loadDataWithBaseURL("file:///android_asset/", builder.toString(), "text

HTML: Making a link lead to the anchor centered in the middle of the page

倖福魔咒の 提交于 2019-11-30 04:41:44
I have a link to an anchor on my html page. When the link is clicked it causes the page to scroll to the anchor so that the anchor is at the very top of the visible part of the page. How can I make the page scroll so that the anchor will be in the middle of the page? charles.cc.hsu I found a solution Anchor Links With A Fixed Header posted by Phillip, he is a web designer. Phillip added a new EMPTY span as the anchor position. <span class="anchor" id="section1"></span> <div class="section"></div> then put the following css code .anchor{ display: block; height: 115px; /*same height as header*/

Set a:hover based on class

Deadly 提交于 2019-11-30 04:11:26
I have the following HTML: <div class="menu"> <a class="main-nav-item" href="home">home</a> <a class="main-nav-item-current" href="business">business</a> <a class="main-nav-item" href="about-me">about me</a> </div> In CSS, I want to set the a:hover for these menu items to a particular color. So I write: .menu a:hover { color:#DDD; } But, I want to set this a:hover color only for those <a> tags with the class main-nav-item and not the main-nav-item-current , because it has a different color and shouldn't change on hover. All <a> tags within the menu div should change color on hover except the

SEO: <button> vs <a> HTML tags [closed]

送分小仙女□ 提交于 2019-11-30 04:07:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm building a project using Twitter Bootstrap. In the documentation it's stated: Button tags Use the button classes on an <a> , <button> , or <input> element. [...] Cross-browser rendering As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser

Using JSF h:outputLink to produce a page anchor

孤人 提交于 2019-11-30 03:30:41
问题 Simple question: How do you create an HTML anchor like <a id="organization" /> with JSF , e.g. <h:outputLink ... /> or another JSF link component? Is it possible at all? 回答1: You could use <h:link> for that. Its id attribute becomes the <a id> and <a name> . <h:link id="organization" value="Organization" fragment="organization" /> It generates the following HTML: <a id="organization" name="organization" href="/currentcontext/currentpage.xhtml#organization">Organization</a> But just using