homepage Welcome to WebmasterWorld Guest from 54.167.238.60
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
image in right corner of a table row
babashankar




msg:4078282
 12:46 pm on Feb 11, 2010 (gmt 0)

Hi,

I have a simple html as below:

<html>
<body>
<table><tr>
<td style="background:#DD6D68" width="100" height="100">
<div>image name</div>
<div style="vertical-align:bottom;float:right;">
<img src="angry.gif" alt="Angry face" width="32" height="32" />
</div>
</td>
</tr>
</table>
</body>
</html>
to test it copy and paste the above code in below URL.
[w3schools.com...]

I want the image to appear on bottom right of the table cell.

Thanks

 

Alternative Future




msg:4078288
 12:53 pm on Feb 11, 2010 (gmt 0)

Hi babashankar

You can add the image to the style in the td to get better alignment, see below:

<html>
<body>
<table><tr>
<td style="background:#DD6D68;background-image:url('angry.gif');background-repeat:no-repeat;background-position:bottom right" width="100" height="100">
<div>image name</div>
</td>
</tr>
</table>
</body>
</html>

HTH

-Gs

babashankar




msg:4078308
 1:32 pm on Feb 11, 2010 (gmt 0)

Thanks. I will check it.

SilverLining




msg:4078310
 1:39 pm on Feb 11, 2010 (gmt 0)

Shorthand for all the background styles:

background: url('angry.gif') #DD6D68 no-repeat right bottom;

Remember that
background-position-x is placed before background-position-y, so the opposite of "bottom right". This matters when px or % is used.
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved