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?
-
what you want is done via a MasterPage, or a template. It has not much to do with CSS.Bazzz– Bazzz2011-08-18 14:41:43 +00:00Commented Aug 18, 2011 at 14:41
-
how can i achieve a masterpage or a template?user448402– user4484022011-08-18 14:43:09 +00:00Commented 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 SmartyBazzz– Bazzz2011-08-18 14:45:26 +00:00Commented Aug 18, 2011 at 14:45
-
but am using cakephp frame and i need my layout to be in CSS.user448402– user4484022011-08-18 14:52:55 +00:00Commented Aug 18, 2011 at 14:52
-
BTW i dont think its css that will help you achieve that, take a look at using PHPRSM– RSM2011-08-18 15:49:38 +00:00Commented Aug 18, 2011 at 15:49
2 Answers
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.
Comments
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.