SWF’s linking to html anchors

12 Jul 2008 In: actionscript, Flash

putting htm anchors in flash swf’s doesn’t seem to work, so we need a Javascript option:

in the html header:

<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures){
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

in the flash call:

getURL("javascript:openNewWindow('html_page.htm#anchor_name','_parent')");

global font settings

7 Jul 2008 In: css framework

I’m diggin’ this for a global font setting (in terms of readability):

p {
font-size: .88em;
line-height:2em;
margin-bottom: 1.33em;
}

The font family is relative to the style of the site, but I tend to prefer san-serifs for body text (Georgia, Verdana, Arial)

Background Image spanning full page

20 Jun 2008 In: css positioning, CSS

I’m not sure this is the best way to do this, but it works. Basically if you want a background image to (repeat) span the height of your page, just have the parent div (usually first parent after body) contain the bgnd image. So, if I have a container div that houses the content columns (left, main, right), I just add a parent div (let’s call it page) and that does the trick:

#page {
background:#xxx url(images/xxx.jpg) repeat-y scroll 0%;
}

I’ve tried adding 100% height to the container div, min-heights, columns, etc… and nothing else worked well.

register_globals in drupal

13 Jun 2008 In: drupal

sometimes when you are using a shared webhost, they may have register globals enabled. You will get an error message regarding this when trying to setup a DB on that host. If so, just create a php.ini file on the directory of the Drupal install and put this code in:

register_globals=off

MG2 image gallery

30 Apr 2008 In: tools, Web Utility

A friend of mine is using this free gallery tool — it looks very slick.
I need to try it sometime

http://www.minigal.dk

Windows Spring Cleaning

22 Apr 2008 In: tools

Steps to spring cleaning your PC:

1. WinDirStat: This free app gives you an x-ray of your HD and shows you the fat.
2. CCleaner: Removes junk files.
3. Diskeeper: Best defragmenter in town.

suckerfish and IE6 z-index fix

13 Apr 2008 In: CSS

IE6 has this problem where forms will always take priority (z-index), and so the suckerfish CSS menu will be problematic overlaying a form. To resolve this, and I’m not sure why it works, but by making the primary menu position:relative and a z-index of higher than 1, the menu suddenly works in IE6.

Removing the RSS feed icon in Drupal

7 Apr 2008 In: drupal

Just put this code in the template.php file:

/**
* remove RSS feed icon
**/
function phptemplate_feed_icon($url){
return;
}

RewriteEngine for Drupal clean URLs

15 Mar 2008 In: drupal

the .htaccess file should contain the following:

RewriteEngine on
RewriteBase /sub-directory-name-here
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Targeting specific browsers in CSS

5 Mar 2008 In: CSS

The dreaded IE6 will be around for a little while longer, and because it interprets some css differently, we sometimes need to target it for layout fixes. Using an underline is recognized by IE6 only.

background: #00f; /* all browsers */
*background: #f00; /* IE 7 and below */
_background: #f60; /* IE 6 and below */

About this blog

A good chef retains recipes for reference, inspiration, and experimentation. In my opinion, a web designer/developer is very much like a chef, using a combination of choices and recipes.

This is my personal data-log of recipes. The posts can be on anything creative, such as code I want to retain for reference; highlights of work for inspiration; editorials on future trends; and of course tips on development; content management; photography; music; video; etc…

Flickr PhotoStream

  • rails
  • greater love
  • hellgate bridge