anchor-tag

Html problem. Anchor tags href not working [Really Weird]?

Edit: closing anchor fixed - This issue exists when testing on the following browsers Google ChromeFirefox 3.5Safari Works with no problems on IE 8 Hey guys, I'v a really weired problem here! In short, take a look at the following html: <a href="login_page.html" class="img"> <span class="img_holder"> <img src="images/columnists/mi...

How to simulate click on anchor with specific text using javascript in GreaseMonkey?

Suppose I load a webpage which contains the following anchor: <a class="someClass" href="#" onClick="gotoPage('http://somepage.org')"&gt;Link&lt;/a&gt; What I want is: as soon as the page is loaded, I want to generate onClick for this anchor which has text as "Link". Note that the anchor does not contains any id or name associated wi...

Disable grey border on anchor (<a>) elements on focus...

I am trying to make the ugly grey border that appears around anchor tags go away. The CSS property "outline:none;" works for Firefox, but how can I do it in IE. Preferably using CSS expressions or jquery. I'm not worried about accessibility BTW. Based on your suggestions I found these to be the best solutions... The jquery(for IE brows...

How Firefox renders links

I just would like to share some of my observation on how Firefox 3.5 on Ubuntu Jaunty Jackalope renders HTML: I have the following entries in my JSP page: <a title="myLink" href="[some url]">link 1</a> <a title="myLink" href="[some url]">link 2</a> <a title="myLink" href="[some url]">link 3</a> <a title="myLink" class="hiddenLink" h...

Chrome vertical scrollbar not working when URL has # at end

I've had an intermittent problem that I thought was due to un-cleared floats. What happens in Chrome (my main development browser) is the vertical scrollbar will lock in the top position and I cannot scroll down the page. Initially when the page starts to load it will allow you to scroll and then when the page is loaded it will jump back...

General offset for all anchors in HTML?

I have some anchor elements, but they are in absolute position div and the content of the div is so large that it scrolls inside (overflow:auto). All entries in the div have an anchor on top, but if I go to this anchor I have the element I wanted to directly on top of the side, but I want it in the center. I need something like an offs...

Unable to click on image inside anchor tag

I have the following html: <a href="javascript:<%# 'js code' %>" class="MyClass"> <div class="HeaderRow" style="vertical-align:middle;text-align:left;height:35px;width:998px;"> <b style="vertical-align:middle;"><%# ((MyObject)Container.DataItem).Name %></b>: <%# ((MyObject)Container.DataItem).ImageSrc%> </div> <p style="margin-left:10px...

Anchor tag around table is not clickable in IE 6, 7 & 8

The problem: when surrounding a table with an anchor tag, the table and everything within is not clickable in IE 6, 7 & 8. How do I solve this issue assuming I can't replace the table with divs? Sample code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <ht...

Prevent tabstop on A element (anchor link) in HTML

Is it possible to cancel an <a href="..."> from being tabstopped in any browser? I would like to do this without Javascript. ...

Weird browser behaviour with HTML anchors in C# WebBrowser control

I have a WebBrowser control which I populate with HTML then display. The HTML contains a few links pointing to anchors in the same page... <html> <head></head> <body> <a href="#myTarget">jump</a> <!-- further down page --> <a name="myTarget"><h2>A heading</h2></a> </body> </html> If I run my app v...

Grab current URL anchor and run X

I am using a coda slider plugin and when you click different segments, it will then load: site.com/#1, site.com/#4 Is there a way to check for that using jQuery, then run a function. I have a slider with 4 parts sunrise, day, sunrise, night And on night ,I want to overlay a transparent PNG. And it is #4, so when the user clicks that ...

Override default behaviour for link ('a') objects in Javascript

Hi, I don't know if what I'm trying to accomplish is possible at all. I would like to override the default behaviour for all the anchor objects ('a' tag) for a given HTML page. I know I can loop through all the 'a' elements and dynamically add an 'onclick' call to each one of them from the body element 'onload' method, but I'm looking f...

To move to a certain part of a page using anchor tag...read the description please.

I'm using the following code to move to this part of the page: . . .<a title="news" name="news"></a> . . But when I access or REDIRECTS from another page to this page using the URL like: http://localhost/mypage.aspx#news, the page goes to that part and again comes at the top of the page automatically changing the URL to http://localho...

php anchor tag regex

Hi, I have a bunch of strings, each containing an anchor tag and url. string ex. here is a link <a href="http://www.google.com"&gt;http://www.google.com&lt;/a&gt;. enjoy! i want to parse out the anchor tags and everything in between. result ex. here is a link. enjoy! the urls in the href= portion don't always match the link tex...

CakePHP URL with HTML Anchor

I'm using cakePHP 1.2, and wondering how I can handle a URL that dynamically builds the page with a slug, but then links to the appropriate area with an HTML anchor. An example: www.mysite.com/pageSlug#anchor I would parse out the slug, which would be used to dynamically build the page. Once built, I would need to jump to the anchor. A...

How to go to anchor tag in scrollable div without having the whole browser jump down?

I'm building a simple glossary widget as part of a larger project for a client. The content of the glossary is enclosed within a scrollable div (overflow:auto). Each letter has an anchor tag associated with it (#a, #b, #c, etc). Above the scrollable div is a div which contains every letter of the alphabet. Clicking on one of these letter...

Set visited link color to whatever the color of un-visited link is (P.S. not the usual question)

I need to set the a:visited CSS to whatever color the normal a is set to. What I want to be able to tell the browser is, for the visited links, use the same color as the unvisited links, whatever color it is. I need to do this without specifying a particular color. Like, if some weird browser comes along that uses "green" as the color...

Set a:hover based on class

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 { ...

Pound sign (#) in filename causing error

I have a very simple file upload that allows users to upload PDF files. On another page I then reference those files through an anchor tag. However, it seems that when a user upload a file that contains the pound sign (#) it breaks the anchor tag. It doesn't cause any type of Coldfusion error, it just can't find the file. If I remove the...

In Firefox, when printing a page with anchor tags, the link location is printing after the text.

For example, <a href="../somepage/page.aspx?qs=asdf">Text Here</a> will print out as... Text Here(../somepage/page.aspx?qs=asdf) In IE, it looks normal (doesn't print the url). Any ideas why this is acting in this fashion? ...