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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:15:29+00:00 2026-05-12T05:15:29+00:00

<div style=overflow:hidden; height:100px; width:100px;> <img src=etc.jpg width:100px /></div> I’ve got an img into a

  • 0
<div style="overflow:hidden; height:100px; width:100px;">
<img src="etc.jpg" width:"100px" /></div>

I’ve got an img into a div. The height of the img is undefined but it is bigger than the 100px of the div.

I want to vertical center the img and hide the top and bottom overflow.

Still I can’t understand how to do this…

Daniele

  • 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-12T05:15:29+00:00Added an answer on May 12, 2026 at 5:15 am

    Does this work for you?

     <div style="overflow:hidden; height:100px; width:100px;">
       <image src="etc.jpg" style="width:100px; position: relative; bottom: 25%;" />
     </div>
    

    Hmmm the result is a bit weird when the image does fit

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

Sidebar

Related Questions

<div id=content> <div id=outer> <div id=header>Transport</div> <div id=image> <img src=../images/img1.jpg style=width:300px;height:300px/> </div> <div id=right_content>large
I have the following markup: <div style=overflow:auto;width:500px;height:100px;> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li>
Here is a 3x3 table: <html> <body style=overflow:hidden;> <style> div.table_div {overflow:scroll;width:378px;height:117px;position:relative;} table.TheTable {width:361px;height:100px;table-layout:fixed;border-collapse:collapse;border:1px solid
What I want: <div style=overflow:scroll;width:100%;height:50%;> &nbsp; <div style=height:500px;width:400px;border:solid 3px red;> </div> </div> <div style=overflow:scroll;width:100%;HEIGHT:50%;>
<div id=div1> <img id=img1 src=1.jpg /> <img src=2.jpg /> <img src=3.jpg /> <div style=float:none;clear:both;></div>
<div id=simg1 style=display: inline> <img src=images/image.jpg> </div> <div id=sbdy><a href=www.google.com>some text</a></div> CSS Style: #simg1
Let's say we have a box with some short paragraphs: <div style=overflow:hidden> <p>Some text</p>
Given this div : <div style=overflow:auto;></div> How can I make the scrollbars visible only
i have this: <div id=parent style=overflow:auto> ... <div id=test>Hello</div> ... </div> My question is:
<header> <div id=logo_box style=-webkit-border-radius: 0px;border-radius:0px;padding:33px;> <h1><a href=index.html id=logo><img src=images/Logo_black_blue.png/><span></span></a></h1> </div> <nav style=z-index:100;margin-top: -50px;float: right;>

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.