html - Image not staying inside div when window is large -


i have image needs in particular location, made div in place need , added img tag inside it, although img tag inside div tag image goes bottom right corner of page. not happen when browser window small.

css:

#teamimg {     width:10%;     height:50px;     background-color:blue;     overflow: auto;     float:left; } 

html:

<div id="teamimg"> <img src="images/picture.png" alt="image" height="18" width="20" class="itemimg" style="float:left"> </div> 

set overflow:hidden on #teamimg rule, can put image background-image background-size:cover;. :)


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -