javascript and such

up until recently i thought javascript was pretty hokey and generally useless in a ‘professional’ site. i was never much for the sites that would pop up a dialog box that would say something like, ‘welcome to my site’ or ‘enter your name’ (and then fill you name in certain parts of their site). while i still don’t like dialog boxes (except in certain instances), my feeling for javascript have changed. i now think it is one of the most powerful tools used on the web.
rachel decided she wanted to change her site’s look today and what she wanted could not be done with css alone. so i had her make this background image and i could then center it with css (still no javascript, i know… but just wait). next what she wanted was to line up a header graphic to the exact pixel of the background. i didn’t think that would be a problem, but then i realized that depending on the width of your browser window and how your browser handled the middle, it would be different (either odd pixels across or even). so, to make a long story shorter, when the browsers width is even the header graphic needed to be moved one pixel to the left and when it is odd, it needs to be in its default location. check out the getwidth() function for a much clearer explanation. if the graphic and the background don’t seem to line up (on this page or this page) please let me know.
i got the idea, sort of, from exploring footers over at a list apart. oh and also, i have implemented the footers css/javascript stuff and improved it (in my opinion) for two (or more, i suppose) column displays. there are a few bugs in it, so i haven’t written about it yet, but look for it soon.

  1. No comments yet.

  1. No trackbacks yet.