简体   繁体   中英

Unexpected padding/margin in image links

Below the main product image here: http://www.ivault.sg/shop/audio/speakers/bowers-wilkins-mm1-speakers There's a space between the line and the image that's not specified in CSS.

Inspecting element using firefox doesn't show any css paddings/margins that would produce that space too.

Which css property is causing this?

this is a side-effect of the img display attribute being set to inline (which is the default value).

add a rule to update it to block :

#image {
    display: block;
}

… and it will be fixed :)

Hey you just define in your css

a img {
    border: 0 none;
    vertical-align: top;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM