Subject: 2 columns layout for stories.

Posted on: 09/04/11 07:15pm
By: joelbarrios

With some help of my good friend 4lb3rt (a.k.a. Tereso Ramos, from d-webstudio.com), I have succeeded into creating a 2 column layout for stories. Check out http://www.alcancelibre.org/ and express your opinion. My website uses Geeklog 1.6.1sr2.

Please, note that there's no need to touch lib-story.php

The idea came from a suggestion made by Dirk to Koalasoft a few years back in some forum post I can't remember.

The recipe:

1) Requisite: storytext.thtml has to be done using only divs. No tables. This is done using only CSS 2.1.

2) Modify storytext.thtml, look for:
PHP Formatted Code
<div class="story">

Change it for:
PHP Formatted Code
<div class="story" id="story{story_counter}">


3) Edit style.css, add the following:
PHP Formatted Code
div#story1, div#story3, div#story5, div#story7, div#story9, div#story11, div#story13, div#story15 {
width:362px;
float:left;
clear:both;
}

div#story2, div#story4, div#story6, div#story8, div#story10, div#story12, div#story14, div#story16 {
width:363px;
float:right;
}


The code above considers that the width of my stories' column has a width of 735px, using % did not work for my layout. Change the width to fit your particular layout. Depending on your layout, probably you will need to change clear:both for clear:left. Play a little and take your time.

4) Clean your browser's cache and enjoy.

My future plans include converting all my layout to a "table-less" one, using only divs and css.

Re: 2 columns layout for stories.

Posted on: 09/04/11 07:27pm
By: koalasoft

This is other example to long time ..

2 columns style joomla

Greetings!! Mr. Green

Re: 2 columns layout for stories.

Posted on: 10/04/11 08:04am
By: Roccivic

Quote by: joelbarrios

My future plans include converting all my layout to a "table-less" one, using only divs and css.



This feature is coming to Geeklog with version 1.8.1 (some time this Autumn) in the form of the "Professional_Css" theme.

Rouslan

Re: 2 columns layout for stories.

Posted on: 14/04/11 05:10pm
By: beewee

Quote by: joelbarrios

With some help of my good friend 4lb3rt (a.k.a. Tereso Ramos, from d-webstudio.com), I have succeeded into creating a 2 column layout for stories. Check out http://www.alcancelibre.org/ and express your opinion..


That is definitely the most beautiful Geeklog layout I've ever seen. Very, very, very nice!! :banana: :banana:

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=92535