1 How do you code? Sat Apr 23, 2011 8:25 pm
RockerMan
Technician
By this I mean do you use cammel case like this:
all Lowercase?
capitalized?
all upper-case?
For me it is camel case, This is because I do alot of Javascript and PHP so It just happens by default I guess
Also, how do you structure your CSS?
For me I will make a seperate file for my reset and include it, then I'll make my master style and call it "master.css" and structure it like this:
Structure styles:
I use this bit for things like float classes and if i'm using the 960 grid I'll put the coloums in there. I also but the body styling in there to as it's the main structure.
General Styles:
This is where they styling for my general elements go, in this example a CSS3 log-in form that I've just finished. Within this bit I will have a ton of comment say what part is what.
Quick Tip: When you want to float something rather then adding it to the element, add a class of fl or fr then add them into the structure of your CSS like I have. Makes for much easier and cleaner coding.
So for example:
So now this element will be floated to the right.
Thanks,
Rob
- Code:
#topContainer
all Lowercase?
- Code:
#topcontainer
capitalized?
- Code:
#TopContainer
all upper-case?
- Code:
#TOPCONTAINER
For me it is camel case, This is because I do alot of Javascript and PHP so It just happens by default I guess
Also, how do you structure your CSS?
For me I will make a seperate file for my reset and include it, then I'll make my master style and call it "master.css" and structure it like this:
Structure styles:
I use this bit for things like float classes and if i'm using the 960 grid I'll put the coloums in there. I also but the body styling in there to as it's the main structure.
General Styles:
This is where they styling for my general elements go, in this example a CSS3 log-in form that I've just finished. Within this bit I will have a ton of comment say what part is what.
Quick Tip: When you want to float something rather then adding it to the element, add a class of fl or fr then add them into the structure of your CSS like I have. Makes for much easier and cleaner coding.
So for example:
- Code:
<div id="topContainer" class="fr">ContentGoes Here</div>
So now this element will be floated to the right.
Thanks,
Rob