Sliced Bread Content Management
research
websites that work!

Monday, November 12, 2007

Creating Equal Column Designs with Javascript and CSS

If you have a CSS template design where you want the design to have a full background colour all aligned, or you just want to have the design that has all equal columns you can use the pre-built Javascript library.

The library is available from Dynamic Drive.

Instructions

Start by inserting the code <script src="equalcolumns.js" type="text/javascript"></script> into the head of your HTML file.

Then download the file equalcolumns.js by right clicking on the link and selecting Save As.

You will then need to change the line:

ddequalcolumns.columnswatch=["leftcolumn", "rightcolumn", "contentwrapper"]

Change the names of the columns from your CSS file you want to make equal. If you only have two columns you can just name the first two entries and leave the final one blank.

Labels: , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home