Lol - I have had the feeling for the last hour that "divitus" was occuring. Apart from manually checking every <div> for its corresponding </div> are there any clever ways of curing divitus?
Get out of the habit of "wrapping" things in a div. Style the actual element where possible, and use divs for what they are: divisions. If you have a group of elements that are grouped together, put a div around them. For example: if you're using XHTML or HTML4, and you have a header with an h1 and h2, do like so:
HTML:
<div class="header">
<h1>Text here</h1>
<h2>Text here</h2>
</div>
Instead of:
HTML:
<div class="header">
<div class="logo">
<h1>Text here</h1>
<h2>Text here</h2>
</div>
</div>
Now, generally, you'll probably have the h1 and h2 in the same area of that header. The h1 and h2 are block elements. Style them directly instead of adding another div around them. Let's say the header is 100% width and the h1 and h2 sit on top of one another 5% from the left:
Code:
.header{
position:relative;
height:60px;
width:100%;
}
.header h1, .header h2{
position:relative;
left:5%;
}
See? No more divs than necessary. You can honestly style any element in
almost any way. If you wanted, you could style <b> tags (bold) to act like divs. There's no practical or semantic purpose for that, but it's entirely possible.