We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

Change 2 column CSS to 3


ArsenalFC

Likes # 0

Hi,
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.

Like this post
ArsenalFC

Likes # 0

The web editor I use is Dreamweaver CS4.

Like this post
Taran

Likes # 0

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.

Like this post
ArsenalFC

Likes # 0

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.

Like this post
Taran

Likes # 0

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 ?

Like this post
ArsenalFC

Likes # 0

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:
Ramblefest.com

Thanks again.

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

Best Christmas 2014 UK tech deals, Boxing Day 2014 UK tech deals & January sales 2015 UK tech...

IDG UK Sites

LED vs Halogen: Why now could be the right time to invest in LED bulbs

IDG UK Sites

Christmas' best ads: See great festive spots studios have created to promote themselves and clients

IDG UK Sites

Stop running out of cellular data on your iPhone, see which apps use the most data