container's border is not visible on the side where image is overflowed

shipping container
containers, docker
container dimensions
container meaning
container size
container virtualization
containers cloud
container technology
html:
<div class="photo">
      <img src="...">

    </div>

css:
.photo {
        width: 300px;
        height: 400px;
        border: 1px solid black;
        overflow: visible;
        margin-top: 20px;
        margin-left: 20px;
      }

      img {
        height: 100%;
        width: auto;
        float: right;
      }

border is not visible on left side when float is "right" and border is not visible on right side when float is "left" https://jsfiddle.net/amc9s21v/2/

.photo {
  width: 300px;
  height: 400px;
  border: 1px solid black;
  overflow: auto;
  margin-top: 20px;
  margin-left: 20px;
}

img {
  height: 100%;
  width: auto;
  float: right;
}
<body>
  <div class="photo">
    <img src="https://images.freeimages.com/images/large-previews/68c/delicate-arch-2-1391623.jpg">

  </div>
</body>

</html>

Container, An intermodal container is a large standardized shipping container, designed and built for intermodal freight transport, meaning these containers can be used´┐Ż Special offers on local and long distance moves - get them before they're gone!

Try to change visible to auto

overflow: auto;

Intermodal container, Containers are a solution to the problem of how to get software to run reliably when moved from Duration: 1:12 Posted: 27 Jun 2017 eTour.com is the newest place to search, delivering top results from across the web. Content updated daily for purchase container.

Simply use overflow: hidden;. Than code becomes:

<!DOCTYPE html>
<html lang="ru"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style>
        .photo{
            width: 300px;
            height: 400px;
            border: 1px solid black;
            margin-top: 20px;
            margin-left: 20px;
            overflow: hidden;
        }

        img{
            height: 100%;
            width: auto;
            float: right;
          }
    </style>


  </head>
  <body >
    <div class="photo">
       <img src="https://images.freeimages.com/images/large-previews/68c/delicate-arch-2-1391623.jpg">

    </div>
  </body></html>

If you want to show overflowed area than try following code:

<!DOCTYPE html>
<html lang="ru"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style>
        .photo {
        width: auto;
        height: 400px;
        border: 1px solid black;
        display: inline-flex;
        margin-top: 20px;
        margin-left: 20px;
      }

      img {
        height: 100%;
        width: auto;
        float: right;
      }
    </style>


  </head>
  <body >
    <div class="photo">
        <img src="https://images.freeimages.com/images/large-previews/68c/delicate-arch-2-1391623.jpg">

    </div>
  </body></html>

DEMO

What are containers and why do you need them?, container definition: 1. a hollow object, such as a box or a bottle, that can be used for holding something, especially…. Learn more. Browse by product name, image or industry to find the perfect fit!

CONTAINER, In this lightboard talk, Ben Corrie explains what a container is for beginners. For more Duration: 18:24 Posted: 16 May 2017 Pack a Cube & We Move It For You! Cheaper than a Truck. Fuel Included. You Pack, We Drive, You Save. See How We Compare To the Competition.

What is a Container?, Docker is a popular, open-source container format that is supported on Google Cloud Platform and by Google Kubernetes Engine. Why Sandbox anyway? Enjoy free shipping on all purchases over $75 and free in-store pickup every day on organization solutions, decorative & functional storage, and custom closets at The Container Store. If you are using a screen reader, activate this link for accessibility features or call 888-266-8246 for assistance.

What are Containers and their benefits, Container definition, anything that contains or can contain something, as a carton , box, crate, or can. See more. Container definition is - one that contains: such as. How to use container in a sentence.

Comments
  • I want to see oveflowed part of the image and container's border over the image at the same time
  • your solution is great.better to explain with a snipet so that others can also learn
  • overflowed part gets hidden in this case, I want to see oveflowed part and container's border at the same time
  • I want to see oveflowed part and container's border over the image at the same time