I have a page where I used a background image for an "A" tag. And if I don't use "display:block" for the "A" tag then the background image is cut-off at the top.
yeah you want display block for the styled element to take up "layout space" otherwise padding on an inline element is basically ignored in terms of spaceing. You can also try inline block.
yeah you want display block for the styled element to take up "layout space" otherwise padding on an inline element is basically ignored in terms of spaceing. You can also try inline block.
I have a page where I used a background image for an "A" tag. And if I don't use "display:block" for the "A" tag then the background image is cut-off at the top.
The expected output: http://img687.imageshack.us/img687/2853/displayblockcutexpected.jpg
The actual output: http://img259.imageshack.us/img259/4894/displayblockcutoff.jpg
The html code:
The CSS code
Can any one explain what is going one here?
Thanks in advance.