html - Need to get rid of space between top image and second div -


so i'm trying set website , want green nav bar flush bottom of image. however, no matter changes make source code , css still leaves space. know how fix this?

html:

<body>   <img src="xyz.gif">   <div class="hasbackground">      ...   </div> </body> 

css:

.hasbackground { background-color: blue; } 

here's example jsfiddle: http://jsfiddle.net/a1mn0ytz/

thanks

your image display: inline, needs display: block. elements inline or inline-block treat white space if it's inline (e.g. spaces between these words.) can manifest vertically, apparently.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -