HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Drop Down Menu Problems with Positioning on Page
Goto page Previous  1, 2
Post new topic   Reply to topic    HTML Help Forum -> HTML Form
View previous topic :: View next topic  
Author Message
PayneLess Designs



Joined: 28 Feb 2007
Posts: 4235
Location: MS

PostPosted: Sat Aug 29, 2009 9:22 am     Reply with quote

I guess the page I went to is an old page as it wasn't working for me today in Firefox. Still, the removal of "#" is not a bad idea as that is making it a bad link for browsers.
marypearson



Joined: 02 Aug 2009
Posts: 11

PostPosted: Sat Aug 29, 2009 9:24 am     Drop Down Menu Problems with Positioning on Page Reply with quote

But I thought I needed the # to create the anchor tag. Is there a better way to do it?

Thanks!
Mary
PayneLess Designs



Joined: 28 Feb 2007
Posts: 4235
Location: MS

PostPosted: Sat Aug 29, 2009 9:48 am     Reply with quote

Only if you are creating a true named anchor tag, but you seem to be using JavaScript to hide/show the div content below the question and you don't need named anchor links or tag for that.

Isn't this what you are using to hide/show the answer divs ?
Code:
<!--
function hideDiv(e) {
document.getElementById(e).style.display = "none";
}

function showDiv(e) {
document.getElementById(e).style.display = "";
}
//-->


The named anchor tags, if used (I didn't check), are not needed when using that script.
marypearson



Joined: 02 Aug 2009
Posts: 11

PostPosted: Sat Aug 29, 2009 10:28 am     Drop Down Menu Problems with Positioning on Page Reply with quote

Thanks Ron. I'll give it a try. Much appreciated!

Mary
marypearson



Joined: 02 Aug 2009
Posts: 11

PostPosted: Sat Aug 29, 2009 10:37 am     Drop Down Menu Problems with Positioning on Page Reply with quote

Sorry Ron. I don't know what I'm doing. I tried it but I'm doing something wrong. Could you please give me an example of what this should be instead of what it is.

<!--topic Banner Advertising -->
<P class="main3">
<a href="#banner" onclick="JavaScript: showDiv('banner');">Banner Advertising</a><br />
<div style="display: none; background-color: #99ccff; border-color: #000000; border-width: 2px; border-style: solid;" id="banner">



<!--question1 -->
<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#banner" onclick="JavaScript: showDiv('banner1');">1. What's the difference between a "Banner Ad" and a "Personal Ad"?
</a><br />
<div style="display: none; background-color: #ffffff; border-color: #000000; border-width: 2px; border-style: solid;" id="banner1">
<p>

thanks!
PayneLess Designs



Joined: 28 Feb 2007
Posts: 4235
Location: MS

PostPosted: Sat Aug 29, 2009 3:25 pm     Reply with quote

OK. I redid that section of the FAQs:
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title></title>
<meta http-equiv="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)" />
<meta name="created" content="Sat, 29 Aug 2009 22:47:11 GMT" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script type="text/javascript" language="javascript">
<!--
function hideDiv(e) {
document.getElementById(e).style.display = "none";
}

function showDiv(e) {
document.getElementById(e).style.display = "";
}
//-->
</script>

<style type="text/css">
div.l_ink {
color: #00f;
text-decoration: underline;
cursor:pointer ;
cursor: hand; /* IE */
}
</style>
</head>
<body>
<!--topic Banner Advertising -->
<p class="main3">

<div class="l_ink" onclick="JavaScript: showDiv('banner');">Banner Advertising</div>

<br/>

<div style="display: none; background-color: #99ccff; border-color: #000000; border-width: 2px; border-style: solid;" id="banner">

<!--question1 -->
<br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div class="l_ink" onclick="JavaScript: showDiv('banner1');">1. What's the difference between a "Banner Ad" and a "Personal Ad"?</div>

<br>

<div style="display: none; background-color: #ffffff; border-color: #000000; border-width: 2px; border-style: solid;" id="banner1">
<p>

<!--answer1 -->
<p class="main3">
A Banner Ad is a picture/message which is found below the Navigation links on the left side of the website, or across the top of one of the website pages.

<br><br>Banner ads are commercial and are used to promote a website, book, music, etc. There is a charge to have a banner ad on ChristianGays.com

<br><br>A Personal Ad is one which promotes an individual for the sake of meeting others usually for the purpose of a long term relationship. Personal Ads can be posted on the <a target="_blank" href="/osdate/">FREE Gay/Lesbian Dating Service</a>.
</p>

<!--close answer1 window -->
<br><br>

<p align=right><a href="#banner" onclick="JavaScript: hideDiv('banner1');">Close "Difference" Window</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>

</body></html>
If you add the style tags to the page and redo the code for each FAQ, you'll solve the problem.
marypearson



Joined: 02 Aug 2009
Posts: 11

PostPosted: Sat Aug 29, 2009 3:57 pm     Drop Down Menu Problems with Positioning on Page Reply with quote

Awesome!!!! Many, many thanks!!!!

Mary
PayneLess Designs



Joined: 28 Feb 2007
Posts: 4235
Location: MS

PostPosted: Sun Aug 30, 2009 2:56 am     Reply with quote

You're very welcome. Let me know how it works out for you.
prabu



Joined: 25 Aug 2009
Posts: 5

PostPosted: Thu Sep 03, 2009 4:42 am     more about html anchor tag Reply with quote

hi..
u need to know more information about anchor tag?
visit this link:
http://u3schools.com/tutorial/html/html_anchor_tag.jsp
i feel its really usefull for you.
thank u. Hope this information usefull for me.
marypearson



Joined: 02 Aug 2009
Posts: 11

PostPosted: Thu Sep 03, 2009 4:55 pm     Drop Down Menu Problems with Positioning on Page Reply with quote

Many thanks! Looks like an excellent website. I appreciate it!

Mary
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> HTML Form All times are GMT - 8 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial