PDA

View Full Version : html and css



rajpreet
11-30-2007, 10:41 PM
hello to all here.......
can anyone tell me about this.......Using css and html, I would like to be able to create a column of images (all of same width but different heights), then create another column to its right with more images, then another, etc.

In my attempts to do this, I have repeatedly run into the problem of not being able to stack images on top of each other. Restraining the width of a div does not result in stacked images, but just seems to break the div.
help me to clear my this point....
thanks

aRudd
12-01-2007, 01:14 PM
couldn't you just add a <br> tag in between each image?

That should put the next image onto a new line without putting a space in between each image

agua
12-01-2007, 09:02 PM
Use margin or padding settings (top or bottom) for the img tag in your container div - something like:


#container img {
margin-bottom: 5px
}

That will make sure each image has a margin of 5px beneath it regardless of the height.

If you add a margin-right of 5px and float all of your images to the left - they will then align in columns... without knowing your div or image dimensions I can't give you an exact example.


#container img {
margin-bottom: 5px
margin-right: 5px
float: left;
}

Here is a good css float tutorial (http://css.maxdesign.com.au/floatutorial/)

priji
01-07-2008, 04:18 AM
This HTML Tutorial will give you an easy, yet thorough and correct introduction on how to make websites. The tutorial starts from scratch and requires absolutely no prior knowledge of programming.

This CSS Tutorial will get you started with CSS in just a few minutes. It is easy to understand and will teach you all the sophisticated techniques.