...

View Full Version : Links won't work! :'(



DawgieDog
12-22-2002, 07:52 PM
When I click the links on this code it won't take me to the given link, why is that?


<html>
<head>
<title>Dotted menu example</title>
<style type="text/css">
<!--
.menu {font-family:Arial; font-weight:bold}
a.menu {text-decoration:none; color:none; cursor:crosshair;}
td.menu {border:1px dashed #000000; cursor:crosshair; }
.sub { filter:glow(color=#ffffff,strength=4)}
.toplevel {border:5px dashed #000000; background-image:url('http://www.geocities.com/the_emc_site/bg2.jpg'); border-collapse: collapse}
-->
</style>
</head>
<body>
<table class="toplevel" width="161" cellpadding="2" cellspacing="3">
<tr>
<td class="menu" id="item1">
<a class="menu" href="http://www.dynamicdrive.com">
<table class="sub">
<tr>
<td>
<li type="square">Members++</li>
</td>
</tr>
</table>
</a>
</td>
</tr>
<tr>
<td class="menu" id="item2">
<a class="menu" href="http://www.dynamicdrive.com">
<table class="sub">
<tr>
<td>
<li type="square">Downloads++</li>
</td>
</tr>
</table>
</a>
</td>
</tr>
<tr>
<td class="menu" id="item3">
<a class="menu" href="http://www.dynamicdrive.com">
<table class="sub">
<tr>
<td>
<li type="square">Get Recruited++</li>
</td>
</tr>
</table>
</a>
</td>
</tr>
</table>
</body>
</html>

scroots
12-22-2002, 07:57 PM
a link should consist of some code like
<A HREF="http://w3.org">this site</A>
i don`t see anything like that in your code

scroots

krycek
12-22-2002, 08:04 PM
...that's odd, scroots, because I can see his links just fine! :confused:

DawgieDog, your code looks fine but to make sure, I copied it into a page and viewed it, and the links worked just fine. I'm not sure why you are experiencing problems?

::] krycek [::

zoobie
12-22-2002, 08:57 PM
Major search engines won't list your page if there's just one broken link. :eek:

scroots
12-22-2002, 09:00 PM
krycek i was just looking at the source code.

scroots

DawgieDog
12-22-2002, 10:14 PM
Originally posted by krycek
...that's odd, scroots, because I can see his links just fine! :confused:

DawgieDog, your code looks fine but to make sure, I copied it into a page and viewed it, and the links worked just fine. I'm not sure why you are experiencing problems?

::] krycek [::

Hmm, strange I copy the source I save it as HTMl and I open it in IE and I click on one of the links and it doesn't take me to the given URL. :mad: :(

krycek
12-22-2002, 10:17 PM
Originally posted by scroots
krycek i was just looking at the source code.

scroots

...scroots, can I ask question?

WHAT source code???

I mean, if you are talking about the same source code as me... the code that DawgieDog posted... then you simply didn't see the links.

He hasn't edited the post, and the code has been there from the start.

Otherwise, I can only assume that you were looking at some other source code, that was not mentioned here? If so, can you please share it? :rolleyes:

Everyone can make mistakes but I am surprised that once I had mentioned it, you didn;t notice! The links are in the code, and they work fine for me.

Just in case you missed it though, here's an extract:


Originally posted by DawgieDog


<a class="menu" href="http://www.dynamicdrive.com">
<table class="sub">
<tr>
<td>
<li type="square">Downloads++</li>
</td>
</tr>
</table>
</a>



All appears to be present and correct! :p

::] krycek [::

krycek
12-22-2002, 10:22 PM
Originally posted by DawgieDog
Hmm, strange I copy the source I save it as HTMl and I open it in IE and I click on one of the links and it doesn't take me to the given URL. :mad: :(

Hmmmm... well, when I read that I opened the file in IE and sure enough, it doesn't work. It works just fine in Mozilla, however! :eek:

Not sure why.

::] krycek [::

DawgieDog
12-22-2002, 11:14 PM
Originally posted by krycek
Hmmmm... well, when I read that I opened the file in IE and sure enough, it doesn't work. It works just fine in Mozilla, however! :eek:

Not sure why.

::] krycek [:: \

Aww crap, don't tell me it doesn't work in IE. I like that menu :p .

PauletteB
12-23-2002, 12:00 AM
Not sure why.

<table> element NOT allowed in <a>...</a>

DawgieDog
12-23-2002, 12:08 AM
Originally posted by PauletteB
<table> element NOT allowed in <a>...</a>

So what's the solution? Sorry, I'm a newb at this.

PauletteB
12-23-2002, 12:30 AM
Put the link inside the table. You may want to retouch the css.

<tr>
<td class="menu" id="item1">
<table class="sub">
<tr>
<td>
<li type="square"><a class="menu" href="http://www.dynamicdrive.com">Members++</a></li>
</td>
</tr>
</table>
</td>
</tr>

krycek
12-23-2002, 01:05 AM
Originally posted by PauletteB
<table> element NOT allowed in <a>...</a>

hmmm, I never knew that! :eek:

...not that I have ever, to the best of my knowledge, felt like doing it...

however, why is it not allowed? Is that according to the W3C spec?

::] krycek [::

SYP}{ER
12-23-2002, 01:24 AM
If it works in Moz and not IE, then it's likely because IE is way behind in standard-compliancy...

Should be fine as both are block elements... Try "display: block" in the table CSS...

Weirdness...

DawgieDog
12-23-2002, 01:26 AM
Originally posted by PauletteB
Put the link inside the table. You may want to retouch the css.

<tr>
<td class="menu" id="item1">
<table class="sub">
<tr>
<td>
<li type="square"><a class="menu" href="http://www.dynamicdrive.com">Members++</a></li>
</td>
</tr>
</table>
</td>
</tr>

That messes up my CSS and I can't get it to work. Why can't I make the borders of this menu dashed?


<style>
A:link {text-decoration:none; cursor:crosshair;}
A:visited {text-decoration:none; cursor:crosshair;}

a.Menlink {
width;100 /*Make this the max width you would like*/
}
.MenuTable{
border-style:outset;
border-width:3;
border-color:red;
}
.MenuTd{
Border-top-style:solid;
border-top-width:1;
border-top-color:darkred;
}
</style>
<table bgcolor="#000000" class="MenuTable" border="0" cellpadding="1" cellspacing="2">
<tr>
<td><img src="bullet" /></td><td><a href="#" class="Menlink">Menu Link</a></td>
</tr>
<tr>
<td class="MenuTd"><img src="bullet" /></td><td class="MenuTd"><a href="#" class="Menlink">Menu Link</a></td>
</tr>
<tr>
<td class="MenuTd"><img src="bullet" /></td><td class="MenuTd"><a href="#" class="Menlink">Menu Link</a></td>
</tr>
<tr>
<td class="MenuTd"><img src="bullet" /></td><td class="MenuTd"><a href="#" class="Menlink">Menu Link</a></td>
</tr>
<tr>
<td class="MenuTd"><img src="bullet" /></td><td class="MenuTd"><a href="#" class="Menlink">Menu Link</a></td>
</tr>
</table>

PauletteB
12-23-2002, 05:25 AM
.MenuTable{
border-style:outset;

try
.MenuTable{
border-style:dashed;

krycek

however, why is it not allowed? Is that according to the W3C spec?
According to
NetMechanic validation (http://www.netmechanic.com/)

joeframbach
12-23-2002, 06:03 AM
paulette how did you get the :o to display as :o?

PauletteB
12-23-2002, 06:13 AM
Under the reply box

Disable Smilies in This Post



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum