Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..

I am trying to add two images to my div tag.i want to align one image to top and one to bottom.while adding image image not at left top corner.there is space from left in div.my code is

.aspx
<img src="images/asc.gif" alt="" /><img src="images/desc.gif" alt="" />


css

CSS
.myDiv
{
    height:100px;
    width:10px;
    border:1px solid black;
    margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
Posted

1 solution

You need to use the position attribute. See here how it works: http://www.barelyfitz.com/screencast/html-training/css/positioning/[^]
 
Share this answer
 
v3

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