Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: DIV Link

  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DIV Link

    Hiya Guys,

    How do I adapt the following code, so the ButPrevEna div becomes a link like href?

    Code:
      echo '<div id="ButPrevEna">';
      echo "<a href=\"./Display.php?id=" . ($start - $perpage) . "\" class=\"NavEna\">Previous Screen</a>";
      echo '</div>';
    Many Thanks, in advance!

    Salchester.
    The Future Is Here - Are You Ready?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Not sure what you mean. There is already a link in there. What are you trying to do? Make the whole div clickable? If thats the case then this has NOTHING to do with php. You will need CSS to make the link inside of it display:block.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    May 2006
    Location
    Wales
    Posts
    820
    Thanks
    1
    Thanked 82 Times in 79 Posts
    This should be in the HTML forum...

    PHP Code:
     echo "<a style="display:block;" id="ButPrevEna" href=\"./Display.php?id=" . ($start $perpage) . "\" class=\"NavEna\">Previous Screen</a>"
    display:block; will make the link as if it is a div


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •