[thelist] Image in a pad

L. Mohan Arun marun2 at yahoo.com
Mon Jun 14 07:41:03 CDT 2004


Dear List Members,

I want to put a image in a box so that there is a 1 px
white space around the image, the box itself has a
solid thin black border.

To visualize what I am talking about, I have the
following HTML/CSS upto now.
<HTML>
<HEAD>
<STYLE>
.imgpad{
	background-color: white;
	width: 73%;
	border: solid black 1px;
	padding-top: 3 px;
	padding-bottom: 3 px;
	padding-left: 1 px;
	padding-right: 1 px;
}
</STYLE>
</HEAD>
<BODY BGCOLOR=#FFFFCC><CENTER>
<div class=imgpad>
<IMG SRC="birthday-1.jpg"><br>
</div>
</CENTER>
</BODY>
</HTML>

The image size may be variable in width and height but
the border and the padding should always be the same,
In the CSS I have, while the left and right sides have
the correct padding, the top and bottom do not.

I would prefer to do it with CSS instead of tables.
Any help would be appreciated.

Thanks,
L. Mohan Arun


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


More information about the thelist mailing list