Hey Everyone,
I'm working on a CRM-type project for our company that is driven by CodeIgniter and JavaScript/AJAX. Things have progressed fine so far, but as the site is growing, I'm losing confidence in how I am referencing CSS/HTML elements (divs, classes, form inputs, etc).S ince this is dynamic, I have multiple CSS-popup divs with forms and data entry that are being added and removed throughout the workflow, each one needing to be formatted a certain way.
What is the best way to keep track of all of these? Is there a naming convention that I should be using? When accessing things through AJAX, should I be referencing the class when things change, the form input element, the div id? I know these are very open ended questions with infinite solutions, but I'm curious how people go about managing large sites with dynamic content? An example of how I have some CSS written is below just to give some brief insight.
Code:
/*
PROJECT BOX STYLING
*/
#project_addOrEditProjectBox {
font-size:14px;}
#project_addOrEditProjectBox .loading {
margin-left:-25px;
margin-top:-25px;}
#project_addOrEditProjectBox label {
display:block;
font-size:12px;
margin-bottom:2px;
text-align:left;}
#project_addOrEditProjectBox input[name=street] {
display:block;
margin-bottom:4px;
text-align:left;
width:295px;} /*-4px for padding, -2px for border*/
#project_addOrEditProjectBox input[name=city] {
margin-right:6px;
width:174px;} /*-4px for padding, -2px for border*/
#project_addOrEditProjectBox input[name=state] {
margin-right:6px;
text-align:center;
width:29px;}
#project_addOrEditProjectBox input[name=zipcode] {
text-align:center;
width:59px;}