If you noticed that the site is slightly different than when you were last here, don’t worry, it is. I did a bit of work over the weekend to add some subtle design ideas that I had rolling around through my head. Not the least of these was the NN4 fix that I implemented. Read on to see how I handled this relic of a browser and how it added to my overall site design.
I think I’m only just starting to “get” HTML. It was only until very recently that I realized how absolutely critical it was that the web is, ultimately, a text-based medium. Those are pretty loaded words because they express the problems–and implied solutions–of cross-platform web design, the function of web tools such as search engines, and even of accessibility. To put it succintly, “it’s the content, stupid” never rang a bell for me until I actually tried to develop a well-designed website.
What in the world am I on about? Well, take for example my struggle with Netscape Navigator 4. This browser, as many noted in their comments, is just evil when it comes to develop a site using CSS. When I pulled up kennsarah.net, the fonts were askew, the borders were pixels off of where they should be, and the entire right-column of our site was rendered–I kid you not–underneath the left column. I figured that I couldn’t be the only one experiencing these difficulties (and I’m not), but the reason that a lot of this goes unnoticed is that the majority of the sites on the Internet are using design techniques (such as embedded tables) that are circa 1996. The markup on these sites looks like garbage, but you’d never know or care if you were using anything later than a version 4 Internet Explorer or Netscape browser. However, if you use a text browser or–more importantly–a text reader, you’d know that these other sites just can’t cater to people with disabilities, or people who are using other mediums for web browsing such as cell phones or PDAs.
I’m rambling now. Other people have made this point better than I am, but the point is this: websites are about content first, design second. If you place limitations on how your web page can be experienced, than you alienate a potential readership. Now, does that mean that a site should look like garbage? No: my site hardly looks any different today than it did on Friday to anyone using a post-version 4 browser. It’s the markup underneath that changed to accomodate the larger readership. I improved the site in such a way that my original design has been retained, while at the same time allowing the site to be used by a wider audience.
The next logical question to ask is, “But, who will look at your site as only text?!” Well, there are people that do (for their own reasons). If there weren’t, you wouldn’t be able to download the latest version of the Lynx browser. More importantly, though, is that Google looks at web sites in text-only mode. Google doesn’t see graphics (beyond their title and alt attributes), and it can’t understand Flash. I was flipping through the introduction pages of students in my Senior Project class, and one peer had posted a link to his corporate site. I clicked through. Not only did I get one of those annoying “are you HTML or Flash?” menus on the homepage, but when I went to the Flash site I discovered that the entire site–from graphics to text–was entirely embedded in Flash. Search engines can’t read that, and so his potential clientele who are using search engines to find businesses never know his site exists.
“So what were the changes?!”
The first one I’ll start with is, really, the first step to thinking outside the box when it comes to markup design. I have external stylesheets on my site, and, rather than use the standard <stylesheet type="text/css" src="styles-site.css">, I used this:
<style type=”text/css”>
@import url(“http://www.kennsarah.net/styles-site.css”);
</style>
This techique is valid for referring to external stylesheets in post-version 4 browsers, but NN4 doesn’t understand it. It effectually removes the style from the markup from Netscape 4 so you can see what your site would look like in a browser that doesn’t support stylesheets, such as a PDA browser. By making this change to the site, I decided that any browser that doesn’t sufficiently support CSS should just get the raw markup. Some would argue that this doesn’t really answer to the question of accessibility–the site doesn’t look broken anymore, but it sure doesn’t look great, either. My rationale for that decision was that if the user is still using NN4, then I’ll make it readable and navigable, but I’m not going to design an entirely new site in tables just for a browser that is rapidly on the decline.
Once stylesheets were removed, I noticed some interesting things about my site. First, the columns rendered in such a way that the left column was on the top of the page, the blog content in the middle, and the right column at the end. This, I figured, doesn’t make a lot of sense: the main blog content should be placed at the top. To do that, I just moved it to the top of my markup (you can view the source to see what I’m talking about). I also noticed that some text mini-headers (such as those under our links section: friends, family, etc.) showed up as plain text and made the links harder to read. It occurred to me that I could use the <h1> through <h5> tags on my site to distinguish the headers in the markup. Wow, what a grand idea–that tag has only been around since ’96.
I was actually getting into this–the site was looking more and more navigable on my Palm, Netscape 4, and a text-browser as I continued to tweak the HTML. I went a step further: <hr> tags are used in markup to draw horizontal lines. this would be useful in further distinguishing the columns when looking at the site in text- or markup-only. The difficulty was that I didn’t want any of the changes I made in markup to negatively affect the site when viewed with style. The solution was to include the <hr> tags at the bottom of each column, but to make their stylesheet property hidden with this code:
hr {
visibility: hidden;
}
Now, when a user is looking at the site with style, the <hr> tags are hidden, but when someone looks at it without style, the <hr> tags draw the horizontal lines like they’re supposed to.
One final thing I did add, though, was that if a user is looking at the site without CSS, I wanted to let them know that the site doesn’t normally look that plain. So, in my page footer, I added a reference to this bit of code that checks to see if the stylesheets are enabled. If they are not, the JavaScript writes a little upgrade-reminder message:
function CheckStyle ()
{
if (document.styleSheets == null)
document.write(“By the way, this site looks much better in a standards compliant browser.”);
}
That’s it. Next time you get really, really bored, make sure to check out the site in text-only mode.
Hey Ken,
The javascript message is an interesting solution, but what about non-css non-javascript browsers?
Why not just do a:
—
.hidden { display: none; }
<div class=”hidden”>By the way, this site looks much better in a standards compliant browser.</div>
—
That way those with style don’t see it, and those without just get the text.
Ryan, good call. Originally, I had justified that non-js/non-css browsers were probably Google, Lynx, etc. who didn’t need reminding about the standards compliance thing (I mean, if you’re using Lynx, there’s got to be a good reason). But, I may just go ahead and do that in my next template hacking adventure.
Hmm. Interesting point about the “by choice” thing. But then again, there are also browsers like Net Positive on BeOS, and all the other little oddities out there.
But yeah, lynx and google and such are probably by choice most of the time (usually I use links or lynx to download source to mozilla. ;P)
Gah… This isn’t displaying properly in Opera. The text mishmashes near the bottom and i lost the center table in the middle (where it mishmashes…)
John, hey–that would be my footer colliding with the middle column of the page. This is not surprising as I’ve had some difficulties with the footer when I tried to append it to every page. What Opera should be doing is appending it to the bottom of the longest column. Instead, what it’s doing is appending it to the bottom of the last column in the markup. Silly Opera–that’s what CSS is for! I’ll probably get around to fixing it at some point this semester.
Hrm. It’s not the first one I’ve seen, either… I’m going to pick some Opera brains about that, because it SHOULDN’T be doing that.
Seems to work okay in Opera 7.
More and more interesting. The “By the way, this site looks much better in a standards compliant browser” message comes up in Opera 7, although the footer has proper placement now.
I wonder why Opera is bent on adding whitespace all over my site design (page borders, banner graphic, etc.)…
Hrm. The compliance message doesn’t come up in mine.
The whitespace problem seems alleviated in my window. I wonder why it shows up strangely in yours.
One thing I noticed in Opera 7: on my page, whenever Opera first loads, it loads the stylesheet incorrectly (the center column is way too far to the left). A reload corrects it.
Opera 7 is strange so far.
Opera… Netscape… I hate them all. I even hate IE. Just make one stinking standard. By the way, designing for all browsers almost always makes for less than optimal design. Just the nature of the beast. Won’t it be nice in 2010 when we’ll all be like: “Remember when we had more than one standard browser? Yeah, what were we thinkng!?”…
The Captain’s page works in all browsers, and I think is designed fairly well. Took too long to make it compliant though… and I am now questioning the linux browser…
whatever. ARGH! Browsers suck…
Pingback: The Continuing Story of Jai and Becky Brinkofski