Search Results

Search found 752 results on 31 pages for 'anchor'.

Page 1/31 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Anchor tag not centered on page after clicking

    - by jennyjune
    I am creating a website that scrolls down to different divs by the use of anchors. However, when I click on a link, that anchored div is not centered on the page. I positioned my divs absolutely but I have no idea if that is affecting it? Anyone have any clue how to get the divs centered using anchors? Please help! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Jean and James</title> <script src="js/jquery.js" type="text/javascript"></script> <script src="js/jquery.anchor.js" type="text/javascript"></script> <link href="jj_css.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="navigation" align="center"> <a href="#jeanandjames" class="anchorLink">JEAN AND JAMES</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#feature" class="anchorLink">FEATURE PRODUCT</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#contact" class="anchorLink">CONTACT</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#work" class="anchorLink">WORK</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div> <div id="logo"> <img src="logo.gif" /> </div> <a name="jeanandjames" id="jeanandjames"> <div id="jeanandjames" align="center"> <img src="jeanandjames.jpg" /><br /> A boutique design firm specializing in hand crafted products and graphic print work. </div> </a> <a name="feature" id="feature"> <div id="feature"> <img src="baby_bowtie.gif" /> </div> </a> <a name="contact" id="contact"> <div id="contact"> Jean & James Chicago, IL<br /><br /> Donec faucibus nunc eget quam pretium vel porttitor diam venenatis. Nullam egestas, quam et congue rutrum, diam mauris tempus urna, eget mattis quam quam ac erat. Vivamus lobortis nunc quis arcu lobortis vel euismod felis tincidunt. Etiam facilisis, metus et mattis tempor, erat ipsum tincidunt diam, nec aliquam velit risus a lacus. Duis tempor bibendum felis, adipiscing mattis lorem eleifend fermentum. Nulla adipiscing consequat enim id sagittis. Suspendisse venenatis scelerisque orci, sed sollicitudin erat egestas in. Nunc orci leo, adipiscing vel consectetur sit amet, rutrum vitae nulla. Mauris ut mi nunc, non condimentum risus. Donec varius consequat quam vel lacinia. Etiam et eros nec quam egestas pellentesque sit amet ac nunc. </div> </a> </body> </html> And here is my css: #navigation A:link {text-decoration: none; color: #FFFFFF;} #navigation A:visited {text-decoration: none; color: #FFFFFF;} #navigation A:active {text-decoration: none; color: #FFFFFF;} #navigation A:hover {text-decoration: none; color: #CC9;} #navigation { position: fixed; top: -1px; left: -1px; width: 100%; height: 20px; padding: 10px; z-index: 10; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #000; color: #FFF; } #logo { position: fixed; top: 150px; left: 50px; } #jeanandjames { position: absolute; top: 230px; left: 200px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; } #feature { position: absolute; top: 600px; left: 200px; } #contact { position: absolute; top: 1200px; left: 200px; width: 500px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; }

    Read the article

  • Using HtmlAnchor for anchor tag that navigates in-page named anchor

    - by Frank Schwieterman
    I am trying to render a simple hyperlink that links to a named anchor within the page, for example: <a href="#namedAnchor"scroll to down</a <a name="namedAnchor"down</a The problem is that when I use an ASP.NET control like asp:HyperLink or HtmlAnchor, the href="#namedAnchor" is rendered as href="controls/#namedAnchor" (where controls is the subdirectory where the user control containing the anchor is). Here is the code for the control, using two types of anchor controls, which both have the same problem: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Test.ascx.cs" Inherits="TestWebApplication1.controls.Test" % <a href="#namedAnchor" runat="server"HtmlAnchor</a <asp:HyperLink NavigateUrl="#namedAnchor" runat="server"HyperLink</asp:HyperLink The generated source looks like: <a href="controls/#namedAnchor"HtmlAnchor</a <a href="controls/#namedAnchor"HyperLink</a I really just want: <a href="#namedAnchor"HtmlAnchor</a <a href="#namedAnchor"HyperLink</a I am using the HtmlAnchor or HyperLink class because I want to make changes to other attributes in the code behind. I do not want to introduce a custom web control for this requirement, as the requirement I'm pursuing is not that important and it would be hard to talk the team into abandoning the traditional ASP.NET link controls. It seems like I should be able to use the ASP.NET link controls to generate the desired link.

    Read the article

  • backlink anchor text / keyword stratergy post penguin

    - by sam
    Ive heard allot recently about over optimisation regarding backlink anchor text ofsite. What ive heard from seomoz was sites most effected by the penguin update had over 60% of their backlinks anchor text the same, so google saw this is unnatural and penalized them. Which kind of makes sense as its not normal to have such high density on one word / phrase. If i where building links for a gastro pub in london. (this is purely hypothetical). The sort of keywords i would go after are "gastro pub in london" and "london gastro pub" If i where to mix up the anchor text by having: gastro pub gastro pub in london london gastro pub would this be seen as ok ? or would these all be seen as broad match keywords and counted as one phrase, making me fall foul of the penguin update ?

    Read the article

  • Anchor bug on IE9, anchor hitbox overlapped

    - by user1456399
    The menu below works just fine in Firefox and Chrome, but in IE9, but hitbox for the "HOME" anchor is being covered partially by the list item behind it except for the actual test, and a single horizontal pixel line at the top and bottom of the button. Can anyone see what I'm missing? Code to follow: index.html <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <title>Navigation</title> <style> .menu-container { width:960px; height:45px; margin:0 auto; position:relative; z-index:2; background-color: #3d3d3d; margin-bottom: 20px; } .menu-navigation { font-family:Arial, Helvetica, sans-serif; font-size:13px; list-style:none; padding:0; margin:0; text-align: right; font-size: 0; /* Removes whitespace between <li> */ } .menu-navigation > li { display:inline; margin:0; border-left:solid 1px #242424; background-color:transparent; font-size: 12px; padding: 15px 0 15px 0; } .menu-navigation > li:hover, .menu-navigation > li.current-menu-item { background-color:#202020; } .menu-navigation > li.active, .menu-navigation > li.active:hover { background-color:#131313; } .menu-navigation > li a { text-decoration:none; color:#bbbbbb; } .menu-navigation > li a:hover { color:#efefef; } .menu-navigation > li span a { color:#ffffff; } .menu-navigation > li a:focus { outline:none; } .menu-navigation > li.menu-item-parent > span, .menu-navigation > li > span > a { text-transform:uppercase; outline:0; text-decoration:none; color:#ffffff; text-shadow:1px 1px 1px #000000; line-height: 45px; display: inline-block; height: 45px; padding: 0 20px 0 20px; } .menu-navigation > li.menu-item-parent > span { background:url("../img/down.png") no-repeat right center; } .menu-navigation > li.menu-item-parent > span:hover, .menu-navigation > li > span > a:hover { cursor:pointer; } </style> </head> <body> <div class="menu-container"> <ul class="menu-navigation"> <li><span><a href="#">This is a link</a></span></li> <li><span><a href="#">This is a link</a></span></li> <li class="menu-item-parent"><span>Not a link</span></li> <li class="menu-item-parent"><span>Not a link</span></li> <li class="menu-item-parent"><span>Not a link</span></li> </ul> </div> </body> </html> EDIT: Alright, I've changed the code to isolate the issue, and narrowed down the problem CSS. Simply adding a background image fixes the issue. The code is set up so it styles so the hit boxes for all the menu items are the same regardless if there's a link in them or not to facilitate an "onClick" drop down on those menu items without anchors. Refer to lines 81 - 86. Remove those lines (just a background image), and the hit box issue is seen in the menu items "NOT A LINK" as well. Further, the act of adding a background image fixes the hit box issue of "THIS IS A LINK" menu items. Simply add the following snippet to the CSS: .menu-navigation > li > span > a { background:url("../img/down.png") no-repeat right center; } Adding a background image, even if there is no actual image, is changing something with regards to the hit box... I'm just not sure what...

    Read the article

  • Tack anchor link with Google Analytics

    - by Fredrik
    I have searched for how to track anchor links in analytics, but couldn't get it working. I have this code in the header: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('_setAllowAnchor', true); ga('create', 'UA-*******-1', '****.com'); ga('send', 'pageview'); </script> And my links looks like this: <a href='#/contact'><span>Contact</span></a> I also tried to use this links: <a href='#/contact' onClick="_gaq.push(['_trackPageview', location.pathname+location.search+location.hash]);"><span>Contact</span></a> Is there any tips on what I can do?

    Read the article

  • Firefox reloading parent page in iframe when clicking named anchor

    - by masty
    My site has an iframe which is dynamically populated with html content. The html often contains named anchors, which work fine in IE/Chrome but in Firefox it reopens the entire page within the iframe. Here's an example: load the page in firefox, scroll to the bottom of the iframe, click the "back to top" link, and you will see what I am talking about. <html><head></head><body onload="setFrameContent();"><script> var htmlBody = '<html> <head></head> <body>' + '<a name="top"><h1>top</h1></a>' + '<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>' + '<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>' + '<a href="#top">back to top</a></body> </html> '; function setFrameContent(){ if (frames.length > 0) { var d = frames[0].document; d.open(); d.write(htmlBody); d.close(); } } </script> <h1>Here's an iframe:</h1> <iframe id="htmlIframe" style="height: 400px; width: 100%"><p>Your browser does not support iframes.</p></iframe> </body></html> Any ideas?

    Read the article

  • Strange named anchor behavior - only working with the hash mark after a trailing slash

    - by tnorthcutt
    I have an odd problem. Links to named anchors on a site I'm working on are only working correctly if the pound/hash sign is placed after a trailing slash (e.g. example.com/about/#who), rather than directly after a page name (e.g. example.com/about#who). What could be causing this? I should note that this is on a site running WordPress, with the WPML translation plugin. I'm not sure if that's causing the problem, though (otherwise I'd ask on the WordPress Answers SE site). Any suggestions as to what could be causing this strange behavior?

    Read the article

  • Port numbers appended to anchor tags

    - by glifchits
    I've built a static site. Locally, when I serve the content with python -m SimpleHTTPServer everything behaves normally, but when I copy the HTML onto the server and browse the site at the server's URL, some links will have a port number appended to the domain. For example: url.com:84/path where the correct path is url.com/path. The port number is usually different, always between 81-85. It is an Apache server. I'm not experienced with web server configuration, and I'm not the admin of the server. Let me know if there is more information that can help solve my problem. ~> cat /etc/*release* SuSE SLES-8 (i386) VERSION = 8.1 UnitedLinux 1.0 (i586) VERSION = 1.0 LSB_VERSION="1.2" DISTRIB_ID="UnitedLinux" DISTRIB_RELEASE="1.0" DISTRIB_DESCRIPTION="UnitedLinux 1.0 (i586)"

    Read the article

  • Android Webview Anchor Link (Jump link) not working

    - by Joel
    Hi, I have a WebView in my Android App that is loading an HTML string using the loadDataWithBaseURL() method. The problem is that local anchor links (<a href="#link">...) are not working correctly. When the link is clicked, it becomes highlighted, but does not scroll to the corresponding anchor. This also does not work if I use the WebView's loadUrl() method to load a page that contains anchor links. However, if I load the same URL in the browser, the anchor links do work. Is there any special handling required to get these to work for a WebView? I am using API v4 (1.6).

    Read the article

  • iTextSharp Use Link Inside PdfPCell

    - by Baxter
    I am able to successfully put a link in the pdf with a friendly name: Anchor anchor = new Anchor("Google", linkFont); anchor.Reference = "https://www.google.com"; doc.Add(anchor); However, I cannot get get the anchor to work within a PdfPCell. Here is what I have tried so far: var memberCell = new PdfPCell(); Anchor anchor = new Anchor("Google", linkFont); anchor.Reference = "https://www.google.com"; memberCell.AddElement(new Anchor(anchor)); That displays the exception: System.ArgumentException: Element not allowed. I also tried: var memberCell = new PdfPCell(); Anchor anchor = new Anchor("Google", linkFont); anchor.Reference = "https://www.google.com"; memberCell.AddElement(new Phrase(anchor)); This does not throw an exception but it isn't a link it is just the word "Google". I am using the newest version of iTextSharp at this time v.(5.4.4.0) Any help on this would be greatly appreciated.

    Read the article

  • Retain anchor when redirecting subdomain (IE)

    - by dani
    Firefox: http://example.com/about/#anchor - http://www.example.com/about/#anchor Internet Explorer 6-8: http://example.com/about/#anchor - http://www.example.com/about/ Why is the anchor dropped in IE and what can I do about it? (Query string is not dropped, only the #xyz part) I am running Wordpress with the .htaccess below, but the problem is probably to be found elsewhere? Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] Is a PHP header or javascript redirect my only option? Thanks for all hints.

    Read the article

  • Scroll to anchor after jquery.load

    - by Vitaly
    There's placeholder on the page that is loaded asynchronously using jQuery load method. Page URL might have anchor and I want to scroll to the anchor after content is loaded. What is the best way to do that? Problem is similar to this: http://forum.jquery.com/topic/goto-anchor-after-load But I don't like the solution. May be someone has and better ideas on this?

    Read the article

  • Reading URL Anchor on IE

    - by tominated
    Hi, I've got a page full of links to another page with anchors on the end (like this: index.html#anchor). On the page they point to, I have a script that is supposed to read where the anchor points to in order to display something. On firefox it works perfectly, But I've noticed that IE seems to remove the #anchor from the end of the url, so the script can't grab the text. Is there a way around this, without any server side code?

    Read the article

  • Using Javascript to expand DIVs and go to anchor text

    - by radiantjoy
    I apologize that this question is so similar to "How can you check for a #hash in a URL using JavaScript?" but would appreciate your help with the following. I would like to use Javascript to display text that is a) identified by an anchor. b) contained within 2 collapsed DIVs....ONLY WHEN the anchor is in the URL. Otherwise, the page should display with all DIVs collapsed. Something like this: if (theHashIsABC) { Expand 2 DIVs on the page and go to the anchor; } else { just display the page; } Specifics: 1. Using IE7 2. DIVs ids to be expanded '8589' and '6212' out of several DIVs on the page 3. Anchor name is anchorABC I have been told that it is not possible to expand some DIVs in IE7 so I am thinking I need to expand all DIVs on the page. [ I can expand just the 2 with a link within the page: <a class="jumplink" href="javascript:toggleBlock('6212');toggleBlock('8589')";link to expand DIVs</a> ] This is what I have so far (in head section)... if(window.location.hash = "anchorABC") { //this works with a button on the page that expand all divs function showAll(pstrClass) { var aElts = document.getElementsByTagName('div'); setDisplay(pstrClass, aElts, 'show', 'Block'); aElts = document.getElementsByTagName('span'); setDisplay(pstrClass, aElts, 'show', 'Inline'); //would also like the page to move to the anchor } else { // just display the page } In advance, thank you for your time.

    Read the article

  • mod_rewrite with anchor link

    - by Graham
    Hi, thanks for looking. I know you can't redirect anchor URLs to another page, but is it possible to redirect a URL to only a single anchor? So http://www.example.com/video/{title} always gets sent to http://www.example.com/video.php?title={title}#player The only thing that changes is the title, anchor is always the same... I need to redirect to a certain slide on a coda slider

    Read the article

  • Does Google pick up anchor text that is in nested elements?

    - by dangerDAN
    When Google looks at anchor text on a website, will it pickup the text if it is inside nested elements? So for example: <a href="http://www.google.com/">Visit Google</a> To: <a href="http://www.google.com/"> <div class="circle"> <span>Visit Google</span> </div> </a> The reason I ask is because I want to use css3 elements for certain links on my website, to style them as circles. But the anchor text needs to be picked up for these links, so I want to know wether or not the above is bad practice in this case.

    Read the article

  • Zend remove anchor text in url redirect

    - by user351785
    I have a form that is using an anchor name as it's action so that when the form is submitted it is it goes straight back to the form (for example 'www.domain.com/page#contact-form). The idea is if there are any errors then it'll go straight to the form (that's near the bottom of the page) so you can see the errors and continue filling in the form. If the form is valid, I want it to redirect to another page (for example www.domain.com/another-page). The problem is that the redirect url still has the anchor text in the url (in the above example it is www.domain.com/another-page#contact-form). I am using $this->_helper->redirector->goToRouteAndExit(array(), 'another-page', true); to goto the another-page route. I have tried setting the url specifically but that doesn't fix it either. How do I redirect to another page and remove that anchor text from the url?

    Read the article

  • If a blogger writes a whole article about my website, how important are anchor texts?

    - by Noam
    If there is a full article about my web-service, with my brand name in the title, and many relevant keywords that I would like Google to consider in my rankings, and links to my web-site with simple anchor text such as <brand name> and <page title>. Does it make a big difference if I get links to the actual keywords I'm after, or is it enough that these keywords are part of the written text?

    Read the article

  • IE6 iframe anchor links moves iframe up

    - by WastedSpace
    Hi, Having a real head scratching moment... I have a site where there is a footer div that always sits at the bottom of the screen (26px high), and above that I have an iFrame which sizes to 100% of the remaining height. This works well. Even clicking on anchor links inside the iframe works as it should in all browsers (apart from IE6). Unfortunately I still have to support IE6. What is happening in IE6 is that the footer jumps up the page with the iframe still above it when I click on an anchor link. The top part of the iframe is cut off. Even the iframe's scroll bars disappear under the top of the browser. I have created some screen shots to show you what I mean. I have blurred out the actual data for now. How it should look (and does look) in other browsers: http://img100.imageshack.us/i/screen1om.jpg/ How it looks in IE6 before clicking on an anchor link: http://img532.imageshack.us/i/screen2e.jpg/ (I had to make the iframe's height 95%, because if I set it to 100% height weirdly it wouldn't show anything...) How it looks in IE6 after clicking on an anchor link: http://img214.imageshack.us/i/screen3g.jpg/ It's hard for me to show the fool code I am using, as there are lots of other things going on (of which I'm confident doesn't affect the layout), so will try to summarise: The html code (simplified): <div id="ifra"><iframe src="home.php" frameborder="0" name="content_pane" id="content_pane" marginheight="10" marginwidth="10"></iframe></div> <h1 class="toolbar"><a id="footerlink">Site Name</a></h1> The CSS (simplified): html, body { overflow: hidden; } html, body, iframe { height: 100%; } body { padding: 0; margin: 0; } #ifra, iframe { position: absolute; width: 100%; left: 0; } #ifra { top: 0px; bottom: 26px; } iframe { border: 0 none; } .toolbar { height: 26px; background-color: #C2C7C9; position: fixed; bottom: 0; width: 100%; background-image: url(bg.png); background-repeat: repeat-x; background-position: left top; } IE8 specific CSS: #ifra, .toolbar { position: fixed; } IE7 specific CSS: html { padding: 0px; } #ifra, iframe { position: absolute; } #ifra { top: 0px; bottom: 26px; } * html body { padding /**/: 100px 0 50px 0; overflow-y /**/: hidden; } IE6 specific CSS: .toolbar { position: fixed; } * html { overflow-y: hidden; } * html body { overflow-y: auto; height: 100%; } * html .toolbar { position: absolute; } iframe { height: 95%; } #ifra { height: 100%; } I know it's not ideal not seeing the full code, but just wondering if there is anything jumping out at anyone from these lines of code? By the way I did consider dropping the div surrounding the iframe, but for some reason the scroll bars would disappear under the footer in all browsers... Thanks for looking! Ali.

    Read the article

  • Use anchor to display div

    - by scatteredbomb
    I'm using jquery, and need to accomplish a couple things. 1) When someone clicks on a link (or in my case, a div) to display another div, I'd like to add an anchor to the url. So, if someone clicks on a "Live" link, the 'live' div slides down, and we append #live to the url. 2) If someone visits that page and keeps the #live anchor at the end of the url, then the 'live' div should be visible right away. I know how to handle the basic part of slideDown() if someone clicks a div. I don't know how to append the hashtag, or make it so that when the page is loaded that hashtag is checked and displays the respective div. Any help understanding this would be appreciated. Thanks in advance.

    Read the article

  • How to anchor with <option> tag in HTML?

    - by blub
    I'm trying to anchor a div with an option tag but it doesn't work, what´s wrong with my code? Here´s the anchor snippet <select> <option value="#b1">1 test</option> </select> <br /> <br /> <br /> <br /> <br /> <br /> <div id="b1">Testing!</div>

    Read the article

  • Prevent auto scrolling when clicking tab anchor

    - by JohnCrossy
    On my page I have some tabs that I've added some javascript so when they're clicked the page loads the tab's anchor URL instead of simply changing the view with AJAX, but I now want to stop the browser from auto scrolling to the anchor location. Having done some research, I'm pretty sure I just need to add a couple of lines so that when clicked it returns false or prevents default but, being a noob, I've no idea where to put them!?! I know it's cheeky, but if any answers could include the full script (ie. the below) with the solution, that way I'll understand better and hopefully learn some valuable lessons also :) Here's the code I'm using: jQuery( function() { jQuery('.ui-tabs').bind( 'tabsselect', function( e, ui ) { window.location.hash = ui.tab.hash }); });

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >