Practical reasons to use CSS for layout

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

I'm working on an article on using CSS for layout - specifically, practical reason why you should use it. For this article I want to avoid talking about "right and wrong" or "semantic markup" or technicalities like that. I want to talk about real, results oriented reasons for using CSS. Things that would have a direct impact on visitors, search engines, ease of updating, other efficiencies.

One example is the ability re-position content elements in the code, so your real content can be at the top and the navigation at the bottom, even if it appears differently to the viewer. This way the search engines will see the most relevant content first, and not all your navigation code.

(please, no arguments about tables in this thread!! Lets just focus on the positives of using CSS)

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

I don't know how "practical" this is but if you use CSS for layout and formatting on your website, you can get backlinks from all those CSS showcase type sites. Lots of them are > PR5 and provide good quality backlinks. You also can get a lot of good traffic from them not just PR.

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

That's a good one Matt! I don't have that one on my list. Thanks Smiling

Anything that increases traffic would definitely fit my definition of practical. Same with improving user experience or loading times, easier updating, things like that.

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Well what about the better content-to-code ratio? That means that you're feeding Google good quality, fibre-rich food that it'll digest very easily. Instead of some unhealthy, greasy, bloated code that'll make the poor Google bot ill for the next week.

Less code, on a site that is hit often will reduce bandwidth costs, look at the Microsoft study by Bowman at: http://www.stopdesign.com/articles/throwing_tables/ skip the article and read the numbers if you're in a hurry. Smiling

There's also the consideration that less code equals less download time. If a page loads nice and fast the user is more likely to stay on the site and look at other things. Take this case for instance: http://www.clagnut.com/blog/366/ the authors of multimap found that halfing the page-weight didn't really save their bandwidth, because people stayed on the site for longer! More opportunity to click on those adverts!

Don't forget that it makes code more maintainable. If there's no proprietary code or hack-jobs then any designer/developer can pick-up a website and change it. As long as they understand standards of course. Smiling

a Padded Cell our articles site!

He has: 1,758 posts

Joined: Jul 2002

Generally, using CSS-styled clean markup results in less bloat on the pages, less bloat generally means that search engines read more of your page content, which (if written well) will help in the effort to get high rankings.

This is especially true when considering that search engines (like google) are now looking towards accessible search. My site iPodX doesn't rank that well on a normal google search but appears 3rd on their new accessible search engine.

Andy

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Ooh, those are interesting links, Jeeves! Thanks Smiling The accessible search thing is a good point too, I don't have Accessiblity on my list at all yet (although the types of people who are going to pooh-pooh proper technique will probably also discount addessibility)...

Good to see you around again, Andy Smiling

waffles's picture

They have: 54 posts

Joined: Jun 2006

And I'm assuming that you're thinkign of it from the side of the coder as well. It's just so much easier to update 1 file than 20+. I know you can use includes for that, but it's still good.

Not to mention that CSS code just seems to be cleaner. So it's easier to go find the exact part that you want. That might be because people are taught to keep it clean more than with HTML though.

waffles Radio Coming to a set of speakers near you September 2006

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.