AntipixelNo one knows je ne sais quoi like us

The Value of Design < Home > House Week #5


A Couple of Changes

Comments: 18


I returned a couple of things to the site this afternoon which you may or may not find useful. Let me know if I’ve broken anything again, won’t you.

Logo clicks
Clicking on the Antipixel logo in the header now returns you to the main page, as it always should have. Not sure why this didn’t get carried over from the previous version.

Font sizing
The style switcher is back (over there in the “Featuritis” section of the right-hand column, or bottom-of-the-page column, or wherever the hell that other column is now). You can choose between small, medium (the default), large and x-large fonts. Click through below if you’re interested in hearing why I’m still using Paul Sowden’s JavaScript switcher instead of Chris Clark’s PHP switcher.

Both style switching methods have advantages and drawbacks. The PHP method uses less code and does the processing server-side, so it doesn’t rely on readers having JavaScript activated in their browsers. The JS method does, of course, but it degrades nicely if the browser doesn’t want to handle it.

I wanted to present the font size choices in a pull-down menu so that there weren’t so many links or buttons littering the page (already got plenty of those) but I didn’t want to have to (a) make a choice from a menu and then (b) click a button to activate that choice, believing as I do that making a choice from a menu should also trigger the action in all single-choice menus (menus where multiple choices are possible are different kettles of worms altogether, and I’m dubious that they’re a good idea – but that’s beside the point here).

To get a pull-down to perform the menu item’s action without this additional button requires (you guessed it) JavaScript, so I’d be defeating one purpose of the PHP approach this way. It’s still a fine way to do it, though, but the other thing that kept me using the JavaScript approach is that I would have had to switch all of the pages over to PHP. I’ve got absolutely nothing against this (and some people even think it’s cool to have the .php suffix after your file names ;-) but it’s too big a change for such a feature. I’d love to be playing around with PHP more, and I hope that day will come. But today is not that day.

There’s one more reason why I still prefer the JavaScript method: it doesn’t reload the page each time you change the font size (not that this is something you’d be doing terribly often). The PHP method causes the whole page to reload while the JS method just changes the fonts ‘instantly.’

Finally, a word on the absence of a serifed font version of the style sheets. I’m increasingly wary of using serifed faces on the web and decided that it wasn’t really necessary to provide this option for Antipixel. There are so few sites I can think of where serifed fonts look good that, IMHO, it’s hard to justify. Certainly readability studies suggest that sans-serifed faces are the way to go. Sorry if that’s a disapointment.

•••
Posted to MetaStuff 2002.11.07 (Thu) • 21:52

Comments

Posted by Mariann   2002.11.07, 23:03

I’m not sure if it’s my browser or the page, but the CSS isn’t downloading for me. :(

Posted by Nicklas   2002.11.07, 23:11

No CSS here either. It’s a bit like Lynx…

Posted by Andy   2002.11.07, 23:30

Your site is no knackered! Definitley looks like the CSS is nowhere to be seen!

Posted by jh   2002.11.07, 23:55

A reload doesn’t fix it?

If you could let me know which browser you’re using (including the version) and your operating system, that would be helpful.

The style sheets are presented according to the standard, so even if the switcher itself isn’t working, you should get the default style sheet loading.

Posted by ed   2002.11.08, 00:41

it seems fixed now on the main page… i wasn’t styling for me in ie6/win2k despite reloads etc for your information. the comments page still isn’t styled though

Posted by vis10n   2002.11.08, 00:43

Looks super! (Mac IE5x)

I’m a happy camper.

Posted by ed   2002.11.08, 00:46

now its broken again boo really odd gecko’s fine though

Posted by ed   2002.11.08, 00:51

yay! everythings back again. whatever you did, keep it.

Posted by jh   2002.11.08, 00:55

Ed — Damn! I tested under this configuration this afternoon and couldn’t see any problems. Just firing up Windows again to take another look.

I added a section to the top of the main page that will appear if the styles don’t load (should be invisible otherwise). This section contains a link which should force the default style sheet to load (on JavaScript-enabled browsers).

The thing is though that the default style sheet should load even if JavaScript is disabled and/or you don’t accept cookies (the only purpose of the cookie is to remember your choice of style sheet across pages and vists). The code that calls the default and alternate sheets is up to spec, by the way, although that’s cold comfort right now.

Posted by ed   2002.11.08, 00:56

oh … by the way … just to let you know that selecting small on the javascript switcher puts the menu at the bottom of the page in ie6/win2k (gecko is fine).

Best, ed.

Posted by jh   2002.11.08, 01:03

Oh, that’s deliberate…

<bang!> Fires bullet into brain.

Posted by ed   2002.11.08, 01:11

</bang!>

close your tags, or else you pages will break (more).

Yeah, css creates a real love/hate relationship. I’m trying to figure out why a div breaks its positioning on ie5/mac whilst any attempt to recreate the stylings in a test page throws no problems.

Posted by jh   2002.11.08, 01:31

Jeez, you almost had me running off searching for a tag I hadn’t closed somewhere. I’m a little bit on edge at the moment. ;-)

The whole IE6 thing earlier in the week was as you mention. Identical code and CSS locally and on the server, both running under Apache, and one worked fine and the other wouldn’t. Still have no idea why.

Posted by Anita Rowland   2002.11.08, 02:32

using win2k and IE 5.5, I did have to click the link to get your stylesheet.

Posted by Ryan Carter   2002.11.08, 02:36

IE6 CSS problems.. even after force-reload. Works find in Moz. though.

Posted by victor   2002.11.08, 03:01

If I enter directly into the comments page (from a RSS aggregator as was in my case), I see no CSS and no link to load the CSS either. However, If I go from there to the main page (through the logo link) I see the page with no CSS, but can click on the link (it is visible then) and the CSS loads correctly.

Then, I can go to the comments page and the CSS keeps loaded, and I post this comment to inform you. This is on Win2000 with IE 6

Posted by victor   2002.11.08, 03:06

By the way, seems the logo is underlined…

Posted by nicklas   2002.11.08, 04:48

looks great on EudoraWeb on Palm. :P

Post a comment:

*

* (not displayed)


Remember personal info?
(optional)


* Required
You can use basic HTML below, but URLs don't link automatically.



Make HTML-safe: convert

To help reduce comment spam, you must preview your comment before posting. Sorry about this, but I'm borderline homicidal with the spam crap.

Send This Story to an Enemy









• • •

Search Options

Possibly Related Entries

Complete Archives


Valid XHTML


Antipixel

Antipixel.com
© 2005 Jeremy Hedley
All rights reserved and so forth.
Rights & Administrivia
Privacy info