View Single Post
  #3 (permalink)  
Old 04-13-2008, 01:04 AM
Benjamin Niemann
Guest
 
Posts: n/a
Diggs:
Default Re: Need help creating a "Click absolutely ANYWHERE on this page" link for an HTML page with no content

Hello,

STILL LEARNING wrote:

> I'm not sure if this can even be done, but what prompts the question
> is my desire to be able to create an "Uber Link" script/code of some
> sort, such that even if the html page contains nothing but a
> background image -or- a background color -- in other words, the page
> has neither content nor placed images -- any click, ANYWHERE, will
> launch the URL in your browser.
>
> I realize I can make traditional text links and graphics links; what
> I'm looking for is to be paroled from these . . . and making the
> entire page, whether empty or not, one big CLICK.


Can't image a good usecase for this, but feel free to enlighten me...

You could place a link (preferably with meaningful text for users
non-graphic browsers, i.e. where the user does not "click" or there is
not "entire page") on the page.

<a id="biglink" href="..">Let strange things happen</a>

Then apply the following CSS

#biglink {
display: block;
width: 100%;
height: 100%;
text-indent: -2000px; /* to move the text out of the visible area */
--

you'll also need

html, body {
height: 100%; /* or the height property above will not work */
margin: 0; /* to avoid scrollbars */
padding: 0;
--

HTH

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Reply With Quote