searls03 Posted May 23, 2011 Share Posted May 23, 2011 how do I make content display according to a #link thingy.......like example.com/ex.html#1234. is this the correct format? how do I make thinks display according to it? Quote Link to comment Share on other sites More sharing options...
searls03 Posted May 23, 2011 Author Share Posted May 23, 2011 I forgot thats called an anchor, but how do I hide info until the anchor is clicked? Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted May 24, 2011 Share Posted May 24, 2011 It sounds like you're trying to hide content so that visitors won't see it until they click a link. If that's correct, you'll need to use something like JavaScript. The following tutorial may help: http://www.cssnewbie.com/showhide-content-css-javascript/ On the other hand, if you're just looking to jump to the text after a link is clicked, you could look into named anchors: http://www.google.com/search?q=html+named+anchors Quote Link to comment Share on other sites More sharing options...
hemo-ali Posted May 25, 2011 Share Posted May 25, 2011 if you do not want the guests see some part of the page you can see two codes <a href = "123.html#asd" onclick="document.getElementById("asd").style.display='block'">click here</a> then we will make the div wth id asd <div id="asd"> Hi there </div> I hope it helps Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted May 25, 2011 Share Posted May 25, 2011 <a href = "123.html#asd" ... Note that if you want the named anchor reference (#asd) to work, you'll need to add a named anchor near the <div> tag. <div id="asd"><a name="asd"></a> Hi there </div> If you add the named anchor it will jump to the newly shown content. If you don't want the page to jump to the new content the #asd isn't needed. You could just have the href attribute set to "123.html". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.