March 19th, 2008 by George
When should you use an ID Selector or a class in CSS?
There are many of answers, some more technical than others, but here’s a fast and dirty answer.
Use an ID selector when it will be used only once on the page. For example, DIVs for header, body and footer are just begging to be ID selectors.
Use a Class name when an element will be used more than once on a page. As an example, if you have styles for external links and a different style for internal links you should use a Class name.
SAMPLE: What it Looks Like
<html>
<head>
head code here
</head>
<body>
<div id=”header”> Header stuff here </div>
<div id=”content”> Page content here including an <a href=”something.html” class=”ilink”>internal link</a> and an <a href=”http://www.somewebsite.com” class=”elink”>external link</a>. </div>
<div id=”footer”> Footer stuff here </div>
</body>
</html>

Category: Web Design |
2 Comments »
February 8th, 2008 by George
I’ve been involved in several web projects where we’ve rewritten an html site in asp or php. Your page names will change from whatever.html, whatever.htm, or whatever.shtml to whatever.asp or whatever.php - right? You can opt for this but there are workarounds that may be practical. For example, if your host company allows it you can instruct the server to treat your html, htm or shtml pages as if they are asp or php pages. Here’s a quick example from an asp site was rewritten in with php. The decision was made not to rename the pages with the php extension but instead to leave page names unchanged (like whatever.asp) but have the server treat the pages as if they were php pages. The following was added to the site’s .htaccess file:
## Make all .asp file act like .php
AddHandler application/x-httpd-php .asp
## Make sure the server knows which pages are index pages
DirectoryIndex index.asp default.asp index.html index.htm index.shtml index.shtm
The first line is a comment and the second line tells the server to run the php code in asp pages. Skipping the empty line, the third line of code is another comment, and the fourth line of code tells the server which files are index files. [For more on DirectoryIndex read about Apache mod_dir or try googling the term apache mod_dir.]
Good planning can save you time, money and your audience. Check out these thoughts from W3C’s Hypertext Style: Cool URIs don’t change page into consideration when you are deciding how and if you should change your page names:
QUOTE 1:
In theory, the domain name space owner owns the domain name space and therefore all URIs in it. Except insolvency, nothing prevents the domain name owner from keeping the name. And in theory the URI space under your domain name is totally under your control, so you can make it as stable as you like. Pretty much the only good reason for a document to disappear from the Web is that the company which owned the domain name went out of business or can no longer afford to keep the server running. Then why are there so many dangling links in the world? Part of it is just lack of forethought.
QUOTE 2:
We have so much material that we can’t keep track of what is out of date and what is confidential and what is valid and so we thought we’d better just turn the whole lot off.
That I can sympathize with - the W3C went through a period like that, when we had to carefully sift archival material for confidentiality before making the archives public. The solution is forethought - make sure you capture with every document its acceptable distribution, its creation date and ideally its expiry date. Keep this metadata.

Category: SEO-SEM |
No Comments »
December 24th, 2007 by George
After installing Internet Explorer 7 a couple of days ago, I began losing FTP and passwords in my site definitions, so I went to Adobe’s knowledgebase and followed the instructions in the Dreamweaver 8 for Windows loses FTP login settings issue.
Then tonight I was doing a Find on a page and began repeatedly getting this error:
This search result cannot be displayed because this portion of the document has changed or been removed since the search was performed.
The first thing I did was change the text I was searching, then I went into a completely different site to do a Find, but always the same error. In a huge rush I went back to Adobe’s knowledgebase again and couldn’t find a resolution. Google was helpful with 1 result - yes that’s right only one! Luckily a fellow by the name of Jason Nussbaum has a blog addressing this issue more in detail than I will go into here.
For me the fix was to empty the text in the Find box, then uncheck the Match whole word checkbox. Voila! Read more on Jason’s blog here.

Category: Web Design |
No Comments »