peedurrr peedurrr - 7 months ago 20
HTML Question

Not working, clickable div containing image

I'm trying to make a div containing an image clickable. I have tried all the techniques on Hyperlinking an image using CSS (and acknowledge that it shouldn't really be done in css), and also looked elsewhere for any clues.

At first I thought it was because I hadn't set the size of the div to that of the image, but I still cannot get this to work.

Any ideas would be appreciated. the page where I'm trying this out is here: http://..., i.e., attempting to make the lighthouse graphic clickable (using any technique).

Answer

You just have to change the padding-left for margin-left on the div with id="pagetext" in the style attribute, and everything shall work.

<div id="pagetext" class="animated bounceInDown" style="width: 50%; margin-left: 25%; padding-top: 10px; text-align: center;">
<div class="line"></div>
    <p style="line-height: 20px; margin-top: 10px; margin-bottom: 0px; text-align: justify;">
    The purpose of the Lighthouse Policy Group is to share knowledge, best practice, 
    mutual concerns and the challenges of the role which mainly operates as a team 
    of one within our respective institutions.</p>
    <br>
    <br>
    <p style="line-height: 20px; margin-top: 10px; margin-bottom: 0px; text-align: justify;">
    Our first meeting took place at the University of Plymouth in 2010 and since 
    then, and in the spirit of how the Russell Group and the 1994 Group came to 
    be named, we have called ourselves The Lighthouse Policy Group - the lighthouse 
    being a prominent feature of Plymouth city centre, and because (rather tongue-in-cheek) 
    we shed light on HE policy and the work of policy officers.</p>
    <br>
    <br>
    <p style="line-height: 20px; margin-top: 10px; margin-bottom: 0px; text-align: justify;">
    We take it in turns to host meetings at our member's institutions. The meetings 
    are usually held over two days, and we normally have a talk given by a senior 
    member of the hosting institution to start the session off (often by the Vice-Chancellor). 
    We often start our discussions over dinner on the first night.</p>
    <br>
    <br>
    <p style="line-height: 20px; margin-top: 10px; margin-bottom: 10px; text-align: justify;">
    For enquiries about joining the group, please see our Contact page. </p>
    <div class="line"></div></div>