html - Cant get rid of left padding -


the image going off right of div, trying align left.

here can see there not background on image

.title {    width: 500px;    height: 300px;    position: absolute;    display: block;    float: left;    padding: 0px;    margin-left: 0px;    background: transparent url(https://lorempixel.com/200/200) no-repeat top left;  }
<div class="title"></div>

here shows sizing of div, aligned left yet image has no excess background, text in image

there may unnecessary properties in css, show have tried

i took image google test , aligned left.

maybe issue in other selector.

by removing position:absolute; image positioned on top.

.title {    width: 500px;    height: 300px;    /*position: absolute;*/    top: 300px;    display: block;    float: left;    padding: 0px;    margin-left: 0px;    background: transparent url(https://lorempixel.com/200/200) no-repeat top left;  }
<div class="title"></div>


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -