Getting to know you

By Brett McLaughlin
May 21, 2008 | Comments: 6

This is a continuation of the previous entry, Don't I know you?

You can personalize a site by changing its STYLE...

Whatever you came up with in terms of customizing a site, it boils down to knowing what your customer wants. Do you have younger customers who want fresh designs, but essentially the same information as your older clientele? Do you have different segments of professionals, some who want their information short and to the point, and others who want long descriptions and lots of links?

Whoever your customer is, though, you've really only got two basic ways to change a site. First, you can change the site's style... the look and feel of the site. This usually involves different CSS stylesheets for different types or groups of users:

The same HTML styled completely differently using CSS.

The style of a site affects how it LOOKS, but doesn't change what it SAYS.

There are no dumb questions.


QuestionCSS isn't the only way to change the style of a site, right? I could do it programmatically, too.

Answer There are definitely more ways than just CSS to create multiple styles for a site. For instance, you could write a server-side script to write out HTML specific to each user, or group of users. But CSS is pretty much the universal way to change a site's style, and it involves a lot less programming logic, too.


...or by changing its CONTENT

But suppose that you need to show different users entirely different things. One customer wants movie reviews pulled from an RSS feed, the latest on the NBA playoffs, a rolling stock ticker, and their local weather. Another customer doesn't care about any of that... they just want the top three stories from the Wall Street Journal, the OpEd piece from the New York Times, and a miniature view of their calendar. These choices are about content, not style.

If you want to change the content of your site, CSS isn't going to cut it. Instead, you'll need new data in your page... and sometimes, you'll even need to change the structure of your page, too.

Two sites with the same CSS but different content.

Sharpen your pencilHow would changing the content of a page affect the CSS you write for that page? What if you've already got several CSS stylesheets for your site. Would providing several different content-versions of your site create a problem?

Match the potential problems for a site on the left to the descriptions of how you'd meet those needs on the right.


Comments: 6

Very cool... Does this have to do with a certain head first book coming out (webdesign?)

if its about webdesign i will buy it for sure.. im hoping for a ASP.Net one soon though

So what's my prize for answering the last question correctly? ;-)

And to answer this question...

Different content would probably mean different CSS. Some of the CSS would probably be reusable in which case you can separate out the reusable parts of your stylesheets. Applying the concept of microformats could help a lot with the reusability of styles.

Hi guys-

This actually isn't from Head First Web Design (a book that is coming late this year, you'll be happy to hear). It's simply some stuff we've been thinking about here at the Labs, and I've decided to post. Expect a lot more... there's a set of conclusions I'm driving toward, and these first two posts are just getting us into that.
Hope that helps a bit :-)

Thanks
Brett McLaughlin
Series Editor

ok,

Hey .. come up again with a book by all these thoughts. It will be hit for sure. thanks for the information. made my morning beautiful.

Leave a comment



RSS Feed

Twitter

Facebook


Looking for source files, code, exercise answers, and other materials to go along with your Head First book? Go to this page, find your book on the list, and click on the title.

Get The Latest Head First Tweets!

Get the latest Head First books here!

Head First Algebra Cover Head First PHP & MySQL Cover
Head First Rails Cover Head First Web Design Cover

Head First Algebra, Head First PHP & MySQL, Head First Rails, and Head First Web Design are now available.

Buy 2 Books, Get the 3rd FREE! Use the discount code OPC10 when you buy direct from O'Reilly.