Reply to Re: CSS & Div Tag, Hyperlinked?

Your name:

Reply:


Posted by Ben C on 10/06/06 08:54

On 2006-10-06, Yogi_Bear_79 <nospam@spamsux.com> wrote:
>
> "Harlan Messinger" <hmessinger.removethis@comcast.net> wrote in message
> news:4olbu8Ff1nu8U1@individual.net...
>> Ben C wrote:
>>> On 2006-10-05, Yogi_Bear_79 <nospam@spamsux.com> wrote:
>>>> I created a floating window with the code below. I call it with <div
>>>> id="Uleft"></div>. It contains a table with text and one image. I would
>>>> like to make the entire container clickable. When I click on it I want
>>>> the parent page to change to another page on my website. How?
>>>
>>> Put the whole lot inside an <a> element.
>>
>> A DIV element can't go inside an A element. Only inline elements
>> (excluding another A) can go inside an A.
>
> So is it not possible to do what I want?

You can use JavaScript:

<script>
function click()
{
location = "http://www.google.co.uk";
}

function main()
{
var e = document.getElementById("Uleft");
e.addEventListener("click", click, false);
}

onload = main;
</script>

In your document somewhere should do the trick.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация