Beautiful stacking of DIVs in HTML

Update: Karl just sent me the link to Masonry. Works fine! T H A N K S !

I’ve been tearing my hair the last day to find a way to stack DIVs in multiple columns. I’m illustrating what I’m looking for with some images.

I’m trying to order DIVs with different content and size where you are recommended to read element in this order: One, Two, Three, Four, Five and Six. When you resize the screen (or read it on a smart phone) the DIVs are supposed to be stacked on top of each other in the same reading order. If the width of your screen only can show two columns you read One and two on the first row, three and four on the second and five and six on the last row.

My first idea is to just use float:left. Works kind of good. But only for the last column since it sets the height to all the other columns. Not so nice.

Then I tried to create 3 individual columns and put divs in each of them. This kind of works but you have to sort the DIVs in the wrong order in the HTML. And also the idea is that the DIVs should stack naturally when you make the window smaller. Well. Now they don’t. Too bad.

I searched for a while and found HNterest. They are positioning the DIVs absolute. Ok. So maybe I’ll resort to that? I’ll try that. Later.

Check my sample html and forge it on github as well.

Thanks to Adam for all help in this! I’m not sure what to do without you 🙂

New web site for Section C!

I have just published the web site for the Swedish skateboard distributor Section C! It’s running on WordPress with a custom theme. Much black, to get the nice contrasts with all the photos.

Some screenshots

Home / first -page screenshot
An example of a brand sub page

Add colors to your tag cloud for readability

I’m using the A better tag cloud WordPress widget to be able to configure the tag cloud on my blog. It’s a nice widget that I really recommend!

I wanted to make it easier (and prettier) to use by adding colors to the tags. A darker color means a more used tag, a lighter means that the tag is less used. I based my colors on the Tango palette.

The tag cloud with the original CSS to the left and my customized to the right

All different sizes in A better tag cloud already had their different CSS classes so adding colors were easy. All I had to do was to add the following CSS to the bottom of my styles.css file.

/* Add colors to A better tag cloud */
.nktagcloud-8 {
  background-color:#fce94f;
}
.nktagcloud-9 {
  background-color:#edd400;
}
.nktagcloud-10 {
  background-color:#fcaf3e;
}
.nktagcloud-11 {
  background-color:#f57900;
}
.nktagcloud-12 {
  background-color:#ce5c00;
}
.nktagcloud-13 {
  background-color:#e9b96e;
}
.nktagcloud-14 {
  background-color:#8ae234;
}
.nktagcloud-15 {
  background-color:#73d216;
}
.nktagcloud-16 {
  background-color:#4e9a06;
}
.nktagcloud-17 {
  background-color:#729fcf;
}
.nktagcloud-18 {
  background-color:#3465a4;
}
.nktagcloud-19 {
  background-color:#204a87;
}
.nktagcloud-20 {
  background-color:#ad7fa8;
}
.nktagcloud-21 {
  background-color:#ef2929;
}
.nktagcloud-22 {
  background-color:#cc0000;
}

Enjoy!

SharpWired News Site!

The Planet SharpWired site is now online on our source forge project page!

A screenshot of the SharpWired planet (080813)

Since sourceforge don’t allow outgoing connections on project web pages I have set up the planet elsewhere and uploads the files to sourceforge every hour using rsync. This means that there is a delay for maximum one hour before the page and news feeds are updated. It’s not perfect, but I think it’s good enough. For now at least.

Update: More information about the planet and the customized SharpWired PlanetPlanet skin/template can be found in the SharpWired Wiki.

Update 2: The wiki isn’t alive anymore but here are two screenshots of how it looked.

Please report any problems or errors and have a nice weekend!

New Manticore Skateboards Web Site!

Manticore Skateboard - BannerAt last! The new Manticore Skateboards web site is launched. I have been working on this for some weeks now and it feels great to release it!

All content is created and will be administrated with the wonderful WordPress software.

Screenshots

Screenshot: Manticore Skateboards #3 - News page Screenshot: Manticore Skateboards #3 - Team page Screenshot: Manticore Skateboards #3 - Team page: Jim Augustsson Screenshot: Manticore Skateboards #3 - Product page: Flylite series Screenshot: Manticore Skateboards #3 - Contact page