Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3958848
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:39:29+00:00 2026-05-20T02:39:29+00:00

I have a code block looking something like this: <p class=cont> <a href=otherpage.php class=link><img

  • 0

I have a code block looking something like this:

<p class="cont">
 <a href="otherpage.php" class="link"><img src="test.jpg" alt="" width="100" height="100"/></a>
</p>

and I’ve got some CSS like this:

.cont {
  width:200px;
  height:200px;
}
.cont:hover {
  background-color:#CCC;
}

My question is, if it’s possible to change the size of the link area, so that it takes up the whole

area thus making it clickable – not only the image. I’ve tried giving width and height to the .link class and use display:block but it doesn’t do the trick. Is it even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:39:30+00:00Added an answer on May 20, 2026 at 2:39 am

    See: http://jsfiddle.net/sSGJV/
    Or with 200px dimensions: http://jsfiddle.net/sSGJV/1/

    HTML:

    <a href="http://www.google.com/">
        <img src="http://www.google.com/images/logos/ps_logo2.png" />
        <br />
        Click to go to the Googles.
    </a>
    

    CSS:

    a {
        display: block;
        border: 3px dashed #000;
        text-align: center
    }
    

    As you can see, you can click anywhere inside the <a> tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a code snippet like this synchronized(obj) { do something; }
Hi I have following code block public class Driver { static String x =
I have the following code block for validation in PHP and I can't figure
Is there a way to re-indent a block of code? I'm looking for something
Let's say I have a class with a member that looks like this: readonly
I have a code block that leads to a Internet Explorer cannot display the
I have the code block below, I deleted all unnecessary parts, just left the
I have a code block that checks certain elements before allowing a form to
When i have a code block static void Main() { foreach (int i in
I need syntax help with the following code logic: I have a code block

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.