anchor

Select an anchor within a JQUERY Tab from a link on anther webpage

只愿长相守 提交于 2019-12-04 14:44:06
i'm a complete novice at JQuery and Javascript, and was hoping you could help me out with my problem. I'm using JQuery 1.7.2 and JQuery-ui 1.10.3 Tabs. From an external url, i want to be able to link to an anchor located within a JQuery tab, however the tab name itself is also an anchor. I know how to activate the tab the anchor is located in e.g. http://mysite.com/#tab-1 but where do i go from there? How do I specify the anchor I want to link to located in tab-1 from a url? e.g. http://mysite.com/#tab-1#myanchor Here's the HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Center anchor with image in div

不打扰是莪最后的温柔 提交于 2019-12-04 14:19:07
问题 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: 回答1: Add position:relative to your wrapper and then change the image's CSS to: .anchor > img { height:

CSS word-wrap: break-word not wrapping a tag unless you wrap it in div and add rule there

£可爱£侵袭症+ 提交于 2019-12-04 13:06:15
why does CSS rule a { word-wrap: break-word; } with <div> <a href="...">verylongurlherewithnospaces</a> </div> not wrapping and causing window to show scrollbar, whereas div { word-wrap: break-word; } will do the wrapping at its anchor child's text fine? UPDATE: just noticed (see L3ST-instance URL field at this form when you resize the window) that I needed word-break:break-all instead of word-wrap:break-word, apart from the suggested display:inline-block, so now using: a { word-break: break-all !important; /* make sure containers don't override */ display: inline-block !important; } which

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

别来无恙 提交于 2019-12-04 12:06:19
问题 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 # ? 回答1: Can you reference a fragment on

CSS - How to remove whitespace between anchored images

痞子三分冷 提交于 2019-12-04 11:20:33
I have two anchored images on top of each other, separated with a line break. I want the images to sit directly on top of each other, but in Firefox there is a gap between the images. It works in IE7. The only way I have been able to fix this is by changing the line-height (which I don't want to do). <a href="image.jpg"> <img height="75" width="75" src="image.jpg" /> </a> <br/> <a href="image2.jpg"> <img height="75" width="75" src="image2.jpg" /> </a> Placing the CSS property vertical-align to bottom on the top image will remove the gap in Firefox. Perhaps setting the images to display:block

increase font size of hyperlink text html

蹲街弑〆低调 提交于 2019-12-04 08:10:03
问题 I am working on web application where I have taken href . But the default font of it is too small when comparing to the page. So I want to increase the size of the font. My output page look like below: I have tried by font size for anchor tag but it doesn't show any effect after the font tag. Code I have tried is: <font size="100px"><a href="selectTopic?html" style="text-decoration: none">HTML 5</a></font> So how can I change the font size? 回答1: You can do like this: a {font-size: 100px} Try

Anchor links inside iframe does nothing

跟風遠走 提交于 2019-12-04 07:30:43
Is it possible to have a non-scrolling iFrame inside a scrolling div, and have anchor links inside the iFrame work correctly? The anchor links inside the iFrame should scroll to the spot inside the iFrame, I don't need/want them to point to elements on the parent page. Here is my jsFiddle with a simple example: http://jsfiddle.net/shopguy/WjmHG/ and the code for it: <div style="width: 100%; height: 300px; overflow: auto;"> <iframe style="width: 100%; height: 2000px;" src="http://www.hypergurl.com/anchors.html" scrolling="no"></iframe> </div> I have no association with that hypergurl.com link

CSS: Styling a link based on its href

♀尐吖头ヾ 提交于 2019-12-04 06:52:08
问题 I have a 3rd party link on my website which I want to style. but it don't have any class or id which I can target. Only thing it have is its unique href value. Is it possible to style a anchor tag based on its href value. 回答1: You can use href css selector to style a tag based on link: a[href="your url here"]{ background:red; } Demo 回答2: You can use css attribute selector like: a[href="http://google.com"]{ your css code here ... } More information here . Thanks. 来源: https://stackoverflow.com

jquery .click overriding anchor href when i dont want it to!

与世无争的帅哥 提交于 2019-12-04 06:26:37
问题 I have a set of nested DIVs that slidetoggle using jQuery as the user clicks on them. Inside the innermost DIV there is an anchor tag with an HREF that should navigate somewhere. The problem is that when I click on the link it slidetoggles just like the parent DIVs instead of navigating to the url. If I right click the anchor and select open in new tab then that navigates fine. Please can you spot whats going wrong? Thanks <div class="pod"> <li id='ThirdParty'> <div class='block'> <h1

Absolute Paths beginning with two slashes

懵懂的女人 提交于 2019-12-04 06:02:18
问题 I noticed that Wikipedia links pointing to a path on a different Wikipedia subdomain use a link with the following syntax: //<SERVER_NAME>/<REQUEST_URI> . For example, a link from a file page to the file appears (for example) as //upload.wikimedia.org/wikipedia/en/9/95/Stack_Overflow_website_logo.png . I am familiar with absolute paths (thinking twice about that now) and relative paths and how to use them. However, I have never seen this use. I assume this points to a new server name using