Click here to Skip to main content
15,886,547 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Hi ,

kindly i need help i have a problem in styling one of my pages

check this style sheet

CSS
.tabletddown {
    padding: 0px;
    margin: 0px;
    border-spacing:0;
    vertical-align:bottom;
    height: 100px;
    background-color: #FF3399;
    font-weight: bolder;
    color: #990000;
}


and this is part of my page

CSS
<tr>
    <td class="tabletddown" >
    <img src="Logos/1.jpg" width="100%" height="100px"/>
    </td>
</tr>



i using ASP.net , in perview mode every thing is ok
but when i run the page
there is a line appeared at the bottom of the image
[ in fact its not a line , it is a part of td space ]

check this image and advice

image
Posted

1 solution

You need to put the vertical-align: bottom; on the image, not the cell.

While you're at it, you should move the height and width attributes to CSS also:
CSS
.tabletddown_image {
  width: 100%;
  height: 100px;
  vertical-align: bottom;
}


Here's a jsFiddle to demonstrate: http://jsfiddle.net/qdmX2/[^]
 
Share this answer
 
v3
Comments
Hercal 8-Jan-14 12:37pm    
thanks Brian , i do as you said but still the same problem :(
Brian A Stephens 8-Jan-14 12:55pm    
I added a jsFiddle to show the difference with the new CSS. Try it out.
Hercal 8-Jan-14 19:55pm    
Thank you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900