im about to start work on a new LAMP project.
in general, all the css classes that i make, specially for layout are like this:
.pageBoundaries{
width:999px;
margin:auto;
}
.onethird{
width:333px;
float:left;
display:block;
}
.twothird{
width:666px;
float:left;
display:block;
}
.half{
width:499px;
float:left;
display:block;
}
now , i was thinking that i make a php file to control such things as width (may be color, borders,etc.). just like:
$pageWidth=999;
.pageBoundaries{
width:<?php $pageWidth ?>px;
margin:auto;
}
.onethird{
width:<?php $pageWidth/3 ?>px;
float:left;
display:block;
}
.twothird{
width:<?php ($pageWidth*2)/3 ?>px;
float:left;
display:block;
}
.half{
width:<?php $pageWidth/2 ?>px;
float:left;
display:block;
}
and then i can set headers from this php file so that browser interprets it as a css file. any ideas about this scheme? its pros and cons?
by doing this, i think making multi-colored themes would also be pretty easy.