Log in

View Full Version : CSS code for NO SPACE between objects



pixieflamingo
02-20-2010, 09:14 AM
Hey gang,

i'm trying to alter a tumblr layout i've designed, and i just want to know the css code so that posts (images only) just slot in next to each other, without any space. (As if they were designed like a collage.)

For example, if i'm posting images that are slightly different sizes, each post will just slot in next to the one before it.
i have seen another website with this layout and contacted the designer, to no avail. If i've confused you, check out www.them-thangs.com - that is what i'm on about!

i have been asking EVERYONE, and had no answer... i always seach this forum first for my other queries, so fingers crossed someone can help me out with this.
i would seriously appreciate any help with this at all!!!!

pixie.

YoshiGoneMad
02-20-2010, 10:31 AM
Hi pixie,

It's more simpler than you might think.

Here's how their html code looks like...


<img class="floatleft" src="hello.jpg" />
<img class="floatleft" src="hello.jpg" />
<img class="floatleft" src="hello.jpg" />
<img class="floatleft" src="hello.jpg" />


Now, the only css code I added was this...



.floatleft
{
float:left;
}


Floats the image left.

Here's an example of what I've done.

http://yoshigonemad.pcriot.com/

Let me know how it goes. :)