Change 2 column CSS to 3

  ArsenalFC 16:38 15 Sep 2009

I have a website up and running, which has a linked CSS sheet with 2 columns, elastic, sidebar left.
I want to change the linked CSS sheet to three columns, elastic, sidebars left and right.
Is there an easy way to do this so that, in effect I will now have an empty sidebar on the right in which to add stuff.
Thanks in anticipation of replies.

  ArsenalFC 17:44 15 Sep 2009

The web editor I use is Dreamweaver CS4.

  Taran 21:49 15 Sep 2009

Unless you have built a large site and want to rework your page layout, why not just use the built in template tools in Dreamweaver and create a new 3-column CSS styled page to drop your content into ?

Click on File, click on New, then (making sure HTML is highlighted in "Page type") scroll through the list of optional layouts under the "layout" column and pick any of the 3 column variants.

The principles behind CSS columns are relatively simple - getting them to work properly in various browsers is the challenge :)

Effectively you need an additional set of layout dimensions and format instructions in your stylesheet and you then apply the class/id names from your stylesheet to DIV tags in your (X)HTML

A simple layout is obviously going to be easier to rework than a complex one, and without knowing what you already have in place it is impossible to suggest anything other than general ideas.

Unelss you have loads of existing content in place, starting again with the correctly styled layout shouldn't cause you any headaches.

  ArsenalFC 23:22 15 Sep 2009

My website consists of around 600 pages. Although they are fairly basic pages, it would take me a long time to change them piecemeal, hence my asking about a quicker solution.

Thanks for the replies.

  Taran 08:16 16 Sep 2009

So, as fourm member suggested, can you link to your site or to some sample code ?

The reasons for asking this are simple:

Depending on how your site is currently set up what you are asking for could either be horribly complex or pretty simple.

Any large site would normally use a template system, often with includes for header, footer and so on.

If, on the other hand, you have a large site where lots of duplicate layout code appears in every page, you really have a task ahead of you.

Offloading the styling and even entire page areas into different files allows a very simple change to a global stylesheet and perhaps one include file to get the new layout you want.

Without knowing where your site currently stands it is impossible to recommend a path forward. We need to know where you are now, otherwise we are all floundering around and just guessing at how your site is set up.

One last point: if you run a very large site then you should really look into using a content management system (CMS) of some description where your data is held in a database. All of the good CMS's can easily be 'skinned' or 'themed' and a data-driven site makes managing large amounts of information a doddle.

So, can you provide some example code ?

  ArsenalFC 09:41 16 Sep 2009

Thanks, Taran.
I set up templates, and the pages are relatively simple (very simple by many standards!). Although I chose php pages in anticipation of future changes and additions, the pages are currently pure html.
The site is:

Thanks again.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Alienware 17 R4 2017 review

These brilliant Lego posters show just what children's imaginations are capable of

Mac power user tips and hidden tricks

Comment réinitialiser votre PC, ordinateur portable ou tablette Windows ?