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 9169155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:48:20+00:00 2026-06-17T15:48:20+00:00

I have an image on a page that I would like to set the

  • 0

I have an image on a page that I would like to set the height of that equal to the parent container. If you take this page for example, http://myrtlebeachgolfpackages.com/packages/ ,the main images on the left, I want to fill the height 100% of their respective divs.

So my thought is to grab the height of the parent container and set the height of the image equal to that parent container.

$(".packagepic").height($('this').parent().parent().height());

The layout is basically

<div>
    <a>
        <image class="packagepic">
    </a>
</div>

which is why I am grabbing parent().parent().

However, of course you can see this is not working. Please also note that I cant set the height of ALL the divs to one height, or ALL the images to a certain height because the height of their respective divs changes depending on the package.

Any thoughts on this?

  • 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-06-17T15:48:22+00:00Added an answer on June 17, 2026 at 3:48 pm

    You can use the function http://api.jquery.com/height/

    $(".packagepic").height(function () {
        return $(this).parent().parent().height();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page http://www.mysite.com/image.aspx , that I want to load and display an
I have a messy html that looks like this: <div id=:0.page.0 class=page-element style=width: 1620px;>
I have a background image that I would like to display on top of
I have this jquery plugin that zooms in on photos, but I would like
I have a domain parent.example that is set up by the provider to forward
I have a Silverlight page that I would like to have below appearance in
I'm trying to set up a page that looks like the image below. Here's
I have a page that uses a background image to do rounded corners, and
I have a page that has a large image on it with a number
I have a page that has an image in it and I styled it

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.