CodeinWP CodeinWP

Equal Columns with CSS

In a previous article I described (in principle) a method using JavaScript to get equal columns in a two-column layout. Of course, that’s not always the most elegant solution. Another solution, which is much easier to implement is completely CSS based. I’ll describe briefly how this is done and what possible effects it could have on your site’s layout and code. Here is the demo page, if you want to jump ahead.

Read Article

Cleaner HTML by Avoiding ‘Attributitis’

Did I just invent that word? Most developers using CSS layouts have likely heard of “divitis” (using far too many DIVs in your markup). But what about “attributitis” (or, Attribute-itis, if you will) — the distant cousin of divitis? I didn’t bother googling that word to see if anyone else has used it; I’m hoping I’ve coined it! I thought of it this morning while helping a coworker debug a CSS problem. It struck me that the class and ID attributes that are commonly added to HTML tags can really get out of hand if they aren’t controlled properly. Let’s discuss a few points that will ensure cleaner code and better future development time through the practice of avoiding attributitis.

Read Article

SEO Rules vs. SEO Concepts

Often times, web development blog posts recite easy to understand, step-by-step instructions on how to optimize XHTML code for SEO. Generally, I think this is good. The fact is, web users have low attention spans, and usually the best way to get a message across is to state it simply in point form. But in order for developers and internet marketers to enhance their abilities over the long haul, more is necessary, as we’ll discuss. With this article I’ll show how online writers and readers alike can become part of a long-term commitment to making the web a better place to surf.

Read Article

5 Tips for Better CSS Files

While working on medium to fairly large websites, I’ve recently found it helpful to apply certain coding practices in my CSS files to help readability, and to ensure that any future developers (including me) will have little difficulty editing the CSS code. Since my main CSS files nowadays often end up being anywhere from 1000 to 2000 lines long, here are some quick tips that I think help CSS code to be more readable and web developer-friendly.

Read Article

Must-Use Methods to Spam-Proof Your Email Address

Working for a busy web development & hosting company exposes me to the sad fact that well over 90% of website owners today do virtually nothing to protect themselves from email spam. Spam filters are good, and they’ve come a long way, but they are not the perfect solution — far from it. Even with a close to perfect spam filtering system in place (which never happens), users will still be inclined to waste time sifting through junk mail just to ensure that nothing was incorrectly filtered.

In this post, I’ll describe a few solid methods to ensure that your email address will not be harvested by “bots” or other automated programs that harvest emails from naive website owners.

Read Article

IE6 Ghost Text Bug (With Multiple Solutions)

It is a sad fact that, according to some current browser statistics, Internet Explorer version 6 is still holding one of the highest percentages of use for one browser version (28.9% — although I personally think that number is somewhat inflated for reasons that I’ll save for another blog post). Unless the site you are working on has specific stats that show a much lower number for IE6 users, then it is still necessary to ensure that IE6 is displaying your markup reasonably well.

Read Article

Equal Column Height Using JavaScript

I’m currently working on a project that requires that I use either some very tricky CSS or else JavaScript to make a left column div expand automatically to fit its parent container. The parent container and left hand nav appear on multiple pages, and there is different content, including that which is dynamically generated, so I cannot just add a height to both elements in the CSS.

Read Article

Do You Comment Your DIVs?

Since I started working for my current employer, I’ve built a number of sites from scratch using CSS layouts. I’ve also had to work on older web sites built using older HTML methods. The good thing is, many of these sites have CSS-based layouts. The annoying part is that some of them suffer from divitis (i.e. too many nested <div> tags, in the same style as table layouts). In my view, if developers are going to use this style of layout, then they might as well use tables.

Read Article