Search code examples
csshref

Link pointing to different pages


I have the following coding:

<style type="text/css">
    .clsLink {
        position: absolute;
        width: 100%;
        height: 1300px;
    }
</style>

<a href="http://www.somewhere.com" class="clsLink"></a>

I need the link to point to a different page according to the place where the user clicks in the page.

The link will be divided in three zones:

  • Left zone: calc((100% - 960px)/2)
  • Middle zone: 960px
  • Right zone: calc((100% - 960px)/2)

    How could I proceed with this issue?


Solution

  • three link tags side to side so it shows as one link,, try this :

    html:

    <a href="http://www.somewhere1.com" class="clsLink">please</a>
    <a href="http://www.somewhere2.com" class="clsLink">click</a>
    <a href="http://www.somewhere3.com" class="clsLink">here</a>
    

    css:

     .clsLink {
        width: 100%;
        height: 1300px;
        text-decoration: none;
     }