From a brief overview it looks okay. However, as blupig suggested, comments are great for future reference, or when your document begins to get out of hand. I personally fail to comment so much, as I tend to remember why I did that. However, people looking over my code might not have quite as such of a great time.
The main thing which you need to adhere to is indenting. It's pretty fundamental.
for instance,
Code:
<div class="col8-b">
//content
</div>
In a small div, it's apparent where the div ends, if your div begins to turn into a lot of lines then finding the end of it can be a true nightmare, as well as this, it gives reference to what's included inside of what. So if I want to split a margin somewhere a long the line it's easy to select everything after it, indent it one and add my new div in there.
I'd fire up my pc and provide a good example, but that is going to require far too much effort..
So I'll use your code as an example.
Code:
<body>
<div class="heading">
<div class="jumbotron">
<h1>Hello</h1>
</div>
<p>This is my...</p>
</div>
</body>
Also, taking the same approach in CSS helps.
EDIT: it's also been a while since I've touched css however, if I remember rightly, setting say the paragraph css before changing the class that your setting it to could over-write your paragraph settings as it does it across a broad sense for the class.
So setting your margin for the paragraph at say 10px; then if you write the class broadly after that to 0px; then you're going to over-write it. So try to use pointers after the initial broad brush over the class.
I could be wrong, but it just looks odd right now.
EDIT #2:
Here's a little more reason to do it.
This is a fairly non-optimised method for a boolean response that I'm using right now.
Code:
-(BOOL) runAgainstLastCard:(NSString *) lastCard withPlayedCard:(NSMutableArray *) playedCard {
//Convert strings to suits & rank
NSArray *faces = [[NSArray alloc] initWithObjects:@"A",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"J",@"Q",@"K", nil];
NSArray *suits = [[NSArray alloc] initWithObjects:@"h",@"d",@"c",@"s", nil];
int aqua = 0;
int oneTwoThree = 0;
for (int j = 0; j < [playedCard count]; j++) {
NSString *prevRank;
NSString *prevSuit;
NSString *nowRank;
NSString *nowSuit;
//Ranks up last card, and last suit.
for (int i = 0; i < [faces count]; i++) {
if ([lastCard containsString:faces[i]]) {
//Match saves suit
prevRank = faces[i];
}
}
for (int i = 0; i < [suits count]; i++) {
if ([lastCard containsString:suits[i]]) {
//Match saves suit
prevSuit = suits[i];
}
}
//Ranks up new card & suit
for (int i = 0; i < [faces count]; i++) {
if ([playedCard[j] containsString:faces[i]]) {
//Match saves suit
nowRank = faces[i];
}
}
for (int i = 0; i < [suits count]; i++) {
if ([playedCard[j] containsString:suits[i]]) {
//Match saves suit
nowSuit = suits[i];
}
}
if ([nowRank isEqualToString:@"J"]) {
return true;
} else
if ([prevRank isEqualToString:nowRank]) {
lastCard = playedCard[j];
} else
if([prevSuit isEqualToString:nowSuit]) {
if (j == 0) {
lastCard = playedCard[j];
} else {
//card needs an int value, if the int value is within -1 or +1 then it's acceptable run, else. Not acceptable return false.
int prevRankValue = [self returnRankValue:prevRank];
int nowRankValue = [self returnRankValue:nowRank];
if (prevRankValue == nowRankValue || prevRankValue == nowRankValue - 1 || prevRankValue == nowRankValue + 1 || (prevRankValue == 12 && nowRankValue == 0) || (prevRankValue == 0 && nowRankValue == 12)) {
if (prevRankValue == 12 && nowRankValue == 0) {
//Aqua
aqua = 1;
}
if (prevRankValue == 1 && nowRankValue == 0) {
oneTwoThree = 1;
}
if (aqua == 1 && oneTwoThree == 1) {
return false;
}
lastCard = playedCard[j];
} else {
return false;
}
}
} else {
return false;
}
}
return true;
}
Pretty readable, right?
This is unindented
Code:
-(BOOL) runAgainstLastCard:(NSString *) lastCard withPlayedCard:(NSMutableArray *) playedCard {
//Convert strings to suits & rank
NSArray *faces = [[NSArray alloc] initWithObjects:@"A",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"J",@"Q",@"K", nil];
NSArray *suits = [[NSArray alloc] initWithObjects:@"h",@"d",@"c",@"s", nil];
int aqua = 0;
int oneTwoThree = 0;
for (int j = 0; j < [playedCard count]; j++) {
NSString *prevRank;
NSString *prevSuit;
NSString *nowRank;
NSString *nowSuit;
//Ranks up last card, and last suit.
for (int i = 0; i < [faces count]; i++) {
if ([lastCard containsString:faces[i]]) {
//Match saves suit
prevRank = faces[i];
}
}
for (int i = 0; i < [suits count]; i++) {
if ([lastCard containsString:suits[i]]) {
//Match saves suit
prevSuit = suits[i];
}
}
//Ranks up new card & suit
for (int i = 0; i < [faces count]; i++) {
if ([playedCard[j] containsString:faces[i]]) {
//Match saves suit
nowRank = faces[i];
}
}
for (int i = 0; i < [suits count]; i++) {
if ([playedCard[j] containsString:suits[i]]) {
//Match saves suit
nowSuit = suits[i];
}
}
if ([nowRank isEqualToString:@"J"]) {
return true;
} else
if ([prevRank isEqualToString:nowRank]) {
lastCard = playedCard[j];
} else
if([prevSuit isEqualToString:nowSuit]) {
if (j == 0) {
lastCard = playedCard[j];
} else {
//card needs an int value, if the int value is within -1 or +1 then it's acceptable run, else. Not acceptable return false.
int prevRankValue = [self returnRankValue:prevRank];
int nowRankValue = [self returnRankValue:nowRank];
if (prevRankValue == nowRankValue || prevRankValue == nowRankValue - 1 || prevRankValue == nowRankValue + 1 || (prevRankValue == 12 && nowRankValue == 0) || (prevRankValue == 0 && nowRankValue == 12)) {
if (prevRankValue == 12 && nowRankValue == 0) {
//Aqua
aqua = 1;
}
if (prevRankValue == 1 && nowRankValue == 0) {
oneTwoThree = 1;
}
if (aqua == 1 && oneTwoThree == 1) {
return false;
}
lastCard = playedCard[j];
} else {
return false;
}
}
} else {
return false;
}
}
return true;
}