Page 1 of 1

Centering problem?

Posted: Tue Sep 30, 2008 3:17 pm
by constantin3
Hi there,

A total newbie here - have installed serendipity on my local laptop here to play around with it before making it live.

I'm looking to make the page centered and not be the full width of the browser page.

Is this easy to do? If theres a dummies guide please point it out to the newbie!

Thanks in advance,

constantin3

Posted: Tue Sep 30, 2008 3:51 pm
by Don Chambers
That depends on what template you are using..... which one is it?

Posted: Tue Sep 30, 2008 4:04 pm
by constantin3
That would be useful wouldn't it!!

I'm using the coffee cup theme.

Posted: Tue Sep 30, 2008 4:39 pm
by judebert
To accomplish this, you'll either need to install a template (also called a theme) that implements centering the way you like it, or you'll have to get involved with templating yourself.

Luckily, templating is not so difficult. (Web design is difficult, and we have some very talented people here. But even they will tell you that modifying templates is not too hard.) We use Smarty for our template engine. The top file is index.tpl; it defines the page layout, so it's where you'd want to make changes.

However, you may not need to go that far. We also make extensive use of CSS. The style.css file in the current template directory is the one to make changes to; if your theme already has a wrapper div, you should be able to simply change its width and positioning.

Posted: Tue Sep 30, 2008 4:40 pm
by judebert
Whoops. Late posting. Sorry.

Posted: Tue Sep 30, 2008 4:50 pm
by Don Chambers
constantin3 wrote:That would be useful wouldn't it!!

I'm using the coffee cup theme.
Not sure if I have the most recent version of that template or not, but in the template's folder is a file named style.css. Open that file with a simple text editor.

Look for this:

Code: Select all

#mainpane {
    border-bottom: 1px solid #000000;
    margin: auto;
    margin-top: 10px;
    width: 90%;
    background-color: #FFFAF0;
}
The width is specified as 90% of the browser window. You could reduce that percentage, or make it a specific width in pixels.

Posted: Tue Sep 30, 2008 8:22 pm
by constantin3
That worked a treat, thanks Don.