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

  • Home
  • SEARCH
  • 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 8021729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:04:22+00:00 2026-06-04T22:04:22+00:00

well, I have a div holder with dimensions width:200px and height:110px. When i load

  • 0

well, I have a div holder with dimensions width:200px and height:110px.

When i load an image, normally it exceeds such dimensions, so i need to adjust the image to such content by width or height depending of the dimensions of the image. So, if its adjusted by with, three situations may occur:

1.- height is higher than 110px, so as the div overflow is set to hidden, it will need to center it vertically.

2.- height is equal than 110px, no problem.

3.- (The issue) height is less than 110px. What’s suponed i should do in this situation? because I want to cover all the div content.

Thanks.

  • 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-04T22:04:24+00:00Added an answer on June 4, 2026 at 10:04 pm

    If you load the image as a background for the container, you can mess around with background-size: cover or background-size: contain and use background-position: center center to keep it in the middle regardless of size.

    Alternatively, you might want to use a table cell, as these allow contents to be vertically aligned inside (either use a table with one cell, or display: table-cell on the container).

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

Sidebar

Related Questions

I have a div, below is its css #sign_up_box_1 { width: 400px; height: 280px;
I have a div (with a background image) and the image's width is 40px.
Well i have a transparent div or the background is set to transparent :)
Well I would reproduce in a html page this scenario. I have a div
I have a container div that has the height of my body which is
I have a div that holds a bunch of thumbnail images. Each image has
I have a div with a certain width and within this parent div I
Alright I have a div that contains an image, <div id=image> <img src=images/medium/1.png />
[solved] So I have a div with a constant height at the top of
I have a div with an id main, I want to set its height

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.