0

Is there a way to create a dynamic CSS for 2 columns? What I mean is, there are 2 columns in my webpage, the left and right column. It is similar to Facebook, where the profile picture is the left column and the right column is where your feeds are located. When a link is selected from the left column, without refreshing the page, the right column will display the page automatically. The left column is where my links are located and it is fixed. The only change factor is my right column. How can I create and apply the CSS?

6
  • what you want is done via a MasterPage, or a template. It has not much to do with CSS. Commented Aug 18, 2011 at 14:41
  • how can i achieve a masterpage or a template? Commented Aug 18, 2011 at 14:43
  • a MasterPage is a standard aspect of asp.net. Have a look into any tutorial that teaches you to make your first asp.net website. For php you could use a templating system like Smarty Commented Aug 18, 2011 at 14:45
  • but am using cakephp frame and i need my layout to be in CSS. Commented Aug 18, 2011 at 14:52
  • BTW i dont think its css that will help you achieve that, take a look at using PHP Commented Aug 18, 2011 at 15:49

2 Answers 2

1

You don't need a CSS template in order to use columns. All you need to do is set your column widths to percentages instead of pixels. If you're using a three column grid, with one div taking one column and the other spanning two, then the percentage for the first column would be 33.3333333% (don't bother rounding up, the browser will take care of it) and the second div would be 66.6666666%.

Also, in order for your second div to refresh without loading another page, you'll have to use Ajax.

Sign up to request clarification or add additional context in comments.

Comments

0

There are css3 columns but they are not supported by IE. What a surprise!

It sounds more like you just need a css layout framework. Search for css frameworks / templates. I of course recommend simpl.css.

The page is ugly at the moment but will be updated soon.

2 Comments

how do I download your simpl.css file to implement?
sorry, for some reason my server needs the lowercase version. Here is the existing link but I will add a better version with a zip soon. thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.