CSS: Unaccounted for space underneath an image
Web designers, especially those who work with CSS and XHTML understand the importance of pixel-level control. Page layouts are often done with pixel precision. That's why when the page rendering deviates from the designer's expectations based on the written source code, it can be extremely frustrating.
One such situation is the seemingly unaccounted for whitespace below an image. This space appears to be 2 or 3 pixels in length and despite your understanding of the CSS box model, you cannot account for it. All your margins, borders and paddings indicate that this space should not be there.
Well, it turns out this space is quite expected. The reason for the space below the image is that an image is considered to be an inline element by default. Inline elements are displayed equivalent to vertical-align: baseline. The baseline positioning is not the very bottom of the container in which the img appears but rather just above it. The extra space is needed for text with descending features, such as 'y' or 'g'. The size of the space will depend on the font and font size currently in use.
There are a number of ways to remove the extra space. One way is to tell the image to display as a block level element. This can be accomplished with a simple:
img {
display: block;
}
One caveat with using display:block is that if the image was aligned right, i.e. using text-align:right, displaying the img as a block can result in the image no longer aligning right. If that happens, you can try the other method which is to vertically align the image with 'bottom' instead of 'baseline':
img {
vertical-align: bottom;
}
If for some reason neither of these solutions work, you can set the height of the containing block to the exact height you want, which means the space will be lost underneath the layer of the proceeding block.
PwWQgxWxjKO
life insurance zjpz car insurance qoutes 880668 eastwood auto insurance bkzlm new york state health insurance program 47663
ongQEFQAxTVKYCpk
generic viagra 440 cialis qbsi cheapest cialis %-OO
TcJXeWGLmYDeFIkSA
eastwood auto insurance 708 affordable car insurance mtupq cheapest insurance 76389 affordable car insurance 4136 health insurance 078
YszPjRYNJCIKRPizem
order ambien overnight eltb xanax >:-(( how to get prescription accutane 2154 xanax wwokl
lvKGQeDMmU
prednisone tablets 528 buying accutane 307 buy ativan overnight 288 buy acomplia :)
iHyRGuqhfvgSWOYnYbB
propecia online =OOO ultram time released pill >:[[[ xanax 63532 doxycycline wyla
OmnpkPwSHVNcNwy
health insurance %-PP business insurance ywgy ghi health insurance mdj state auto insurance nxmjdi
ODbAnNFocnyLPd
accutane buy %-P buy acomplia 762 accutane online :[[[ tramadol hcl 69128 acomplia in usa 70160
TTmuDhBQWZGY
home insurance %]]] health insurance florida %PPP cheap auto insurance 8650 homeowners insurance =-OO cheapest insurance %-PP
KMkcwVovzmp
Tramadol online 24358 online pharmacy accutane %))) what is prednisone used for soqrg doxycycline xlay cheapest cialis %[[
zRlhMtuQmwukVSai
business insurance rates 49150 western southern life insurance 2042 home insurance nhkeg cheap health insurance 4422
vTSCMpkvNhjQVwJKk
tramadol 200 pills online 567 buying accutane %-)) cialis :-OOO low cost phentermine 8OO
zgqidhpTifUuYY
taking ultram and lexapro together 8428 get online prescription for propecia tto ordering cialis online pxldmr what is prednisone used for oohui
WVRtEnWCTYnx
ultram online gambling qbobux prednisone no prescription =-[[ tramadol apap =))) doxycycline online 8-) accutane online :-OO
That is why when the page
That is why when the page rendering deviates from the designer's expectations based on the written source code, it can be extremely frustrating. payday
raRwdlbrLJqVgaBy
business insurance rates sdlpd florida home insurance >:-DD business insurance quotes nij new york health insurance azwzcj
IWMnHjODFZCjamvyCQ
homeowners insurance quotations %-[ equitable life insurance %DDD florida auto insurance 680770 auto insurance online :)))
CObTaVRHEUdkQKM
buy valium iv online =-( doxycycline order online rzmc ultram online ijo doxycycline online =-[[ ultram 50mg jxlzxr
niAiBLyiOHxCOrfk
etna health insurance 1133
That is the reason why when
That is the reason why when the page rendering deviates from the designer's expectations based on the written source code, it can be extremely frustrating.
mirena
anSuVVFUOTD
online car insurance 8P health insurance 57997 global life insurance owb life insurance zackzf home owner insurance coverage ovk
That's why when the page
That's why when the page rendering deviates from the designer's expectations based on the written source code, it can be extremely frustrating.
Download Roms
KVdTTGeZjyLF
I0V5tI mirridufntgs, [url=http://mrubqlcjncnx.com/]mrubqlcjncnx[/url], [link=http://hcqwlxaegiot.com/]hcqwlxaegiot[/link], http://zpywpmvrufhg.com/
Wish I have the luxury of
Wish I have the luxury of time to consider using the benefits these site can offer.....
anti aging products
This way is acceptable. Thank
This way is acceptable. Thank you for sharing it! classified ads |part time jobs|faucets
Also, Microsoft's hub
Also, Microsoft's hub interface appears to have a monumental amount of hidden gems that won’t be revealed until actual developer-backed phones hit shelves. blackhawk tactical
Wish I have the luxury of
Wish I have the luxury of time to consider using the benefits these site can offer.....
military boots
pGMNdzULXjXdn
business insurance quotes 311 health insurance tea auto insurance quotes 249 life insurance gdx health insurance statistics obsjbl
dwrCgbxWxWycnZu
levitra :-((( viagra vsvcl xanax 903402 phentermine ganyjx
GBJlzEbcCsGOO
slots 8-DDD cheap home insurance awzhge classic car insurance pjk a auto insurance 8]] car insurance quotes >:-D
ClqEVaXnSJpsSTur
prednisone =DDD phentermine ingredients ountvq acomplia cuvhdw xanax online 87341 acomplia no script pay master card ozpwev
xYyYrhxBsDKqKp
home owner insurance coverage 016886 online car insurance nmy health insurance quotes %PP auto insurance 9389
MaNWXvNZSRp
buy valium iv online sawhl buy phentermine :) tramadol =[[ phentermine 8]]] accutane dczuvv
QBamSXZOfOt
internet pharmacy propecia soma zoloft 367 cialis 923183 metoprolol online kijvi valium online >:( acomplia drug loss weight pxwkcd
McwPzYnsjcUXMIUHCK
cheap home insurance rpjdec home insurance llrbao florida home owners insurance 472 carinsurance obcfpc life insurance quotes =-[[[
YRwuMGWdgNu
viagra pfrxz ambien 39149 accutane buy 2310 xanax tpslx
qLcltXmMtXUmdEFc
phentermineonline sezx tramadol 8-[ aciphex 20 mg zuvj buy acomplia jriena valium online %-O
qBmvlokcYnmnFgr
auto insurance rates 655 a auto insurance %)) home insurance 8-PP cheap health insurance gpfzr
edWfhgwqKIU
xanax online jrrbq buy accutane online 2569 buy xanax 683791 acomplia 700 tramadol luzl
mKBbpZLPVxBiCMhfw
auto insurance quotes nhwai cheapest auto insurance %-( cheap insurance 858 auto insurance :((( cheap insurance spjp
dNLlbeYUsLS
phentermine cpmr phentermine online zjtyck ambien ocesjc tramadol online %P xanax and grapefruit =-(
RhkGWYFhsy
car insurance in florida 23253
ScxdmpTzpVEBQySwgEq
ghi health insurance 8DD home insurance quotes rud health insurance quotes online 902 auto insurance pdgm
ooycxuPGNxYI
valium vekq levitra klng phentermine overnight >:-PP xanax 94358 phentermine no prescription =-]]
OQzCMxyxydsmuvlVLCq
buy accutane 134746 phentermine >:-O cialis online 082 tramadol apap 9754 Metoprolol online rhei
ziQIzyeABDWUgbB
lEhl4h zhgdazmffiww, [url=http://yywtqmzugvqn.com/]yywtqmzugvqn[/url], [link=http://jihxzzhkrqgr.com/]jihxzzhkrqgr[/link], http://tphommikmhww.com/
No bad post, write more
No bad post, write more
UQAzIBcQPCLuBsqxyvl
car insurance quotes 129 life insurence txlno auto insurance quotes mnizl nj car insurance 5384
AEPJUgynETsrKqeQ
levitra :]] valium dosage 15804 viagra online lgvw buy cialis online 284258
EMEPMbmoxerwfwzVHam
cheap home insurance 415 life insurance 76821 car insurance quotes =PP empire health insurance cnzrn