html - Height in CSS with Auto/Calc -
i'm having problem on new website. first should give information.
i'm building full responsive website portfolio. portfolio images stands in div , response screen size. on screen more 1005px it's working perfect. scaling works great. because following css line:
@media screen , (max-width: 1005px) {
the div image newtextportfolio. image doesn't use css except 100% width , height. when give div follow definition (height: auto;) white line under images. , don't want white line :(
.newtextportfolio { width: calc(95% + 10px); height: auto; margin-right: 25px;
}
i can make dissapear if make height example 200px. when view site on ipad makes images stretch (because it's fixed , not responsive).
does know how can make white line dissapear? tried som things calc, percentages makes line, fixed pixels doens't.
on jsfiddle deleted lot of code site. part need. hope can work it.
for jsfiddle: https://jsfiddle.net/gertjan2805/dcpgg9zv/
really great in advance!
make img
element display:block
.
https://jsfiddle.net/jmarikle/95gsk2tu/
an alternative approach give image vertical-align: top;
. being caused fact images inline elements block attributes. retain line height, letter spacing, etc. block level elements not have added calculations size, , aligning vertically collapses attributes cause gap @ bottom.
Comments
Post a Comment