Blog / Web Design

Favicon Creation

Monday, October 26th, 2009

Whenever I make a site, I end up having to make a favicon. Favicons are a nice way to brand a site in the address bar (and tabs). Making favicons for “good” browsers (not IE) is easy since they accept PNG files by declaring a link statement for the image…

<link rel="icon" type="image/png" href="/somepath/image.png" />

However, if you want a favicon that can be picked up by all browsers you’ll want to create an ICO file. I’ve found various online tools that will convert image files to ICO; Favicon.cc was one that I often used. The downside, all the online favicon generators I found gave me a 16×16 ICO file. I wanted an ICO file with multiple sizes so if the user puts the bookmark on their desktop is uses the larger ICO size. So I decided to find a way to easily create a ICO file with multiple embedded sizes (64×64, 48×48, 32×32, 16×16) and I’ve decided to describe how I accomplished this.

These directions are written for Windows, but they can easily be adapted to other operating systems with minor adjustments. First you’ll need to download two tools.

  • ImageMagick - This will be needed to automatically create the appropriate image sizes/formats
  • png2ico - This, as the title suggests, will be needed to convert PNG images to ICO files

Installation
ImageMagick: If you downloaded one of the installers, this one is easy. Just run the installer and follow the on-screen prompts

png2ico: This doesn’t really need to be installed, but you need to copy png2ico.exe into your System32 folder (C:/Windows/System32) so it can be used from any directory in the command prompt

Implementation

  1. Open up your System32 (where you copied png2ico.exe) and create a file titled favicon.bat
  2. Open favicon.bat in a text editor (right click the file and choose Edit)
  3. Enter the following into favicon.bat and then save the file
    convert %1 -resize 64x64^ -gravity center -background transparent -extent 64x64 64.png
    convert %1 -resize 48x48^ -gravity center -background transparent -extent 48x48 48.png
    convert %1 -resize 32x32^ -gravity center -background transparent -extent 32x32 32.png
    convert %1 -resize 16x16^ -gravity center -background transparent -extent 16x16 16.png
    png2ico favicon.ico 64.png 48.png 32.png 16.png
    del 64.png
    del 48.png
    del 32.png
    del 16.png
  4. Open the command prompt (Go to Start > Run, type cmd and hit enter)
  5. Navigate to the folder with your image (cd foldername) and now type favicon filename.png (replace filename.png with the filename of your image) and hit enter

Now, with that little bit of setup, you can create favicons in seconds. I added a few keys to my registry to make it even easier, but I’ll save that for another time.

Wikipedia Security

Wednesday, August 26th, 2009

wikipedia logo 102x125 Wikipedia SecurityWikipedia has always been a great source for uncovering information, such as the storylines for old television shows, a brief history of cities around the world, and definitions of slang and rare words. However, as any college- or high school-aged student can tell you, it’s never been the most reliable source for good, hard facts.

The fact that Wikipedia pages can be edited by anyone who surfs the web poses both a benefit and a problem. Opening the information pages up to the public means that over time, a page collects a wealth of information much more detailed and broad than any single author could produce. Little known facts and useful tidbits pop up over time, making reading a Wikipedia page similar to discussing a particular subject with a large group of friends. No one opinion dominates a page, and most of the time false information is overwritten by other authors with more accurate information.

Sometimes, however, false information is not removed quickly, much to the downfall of those looking to gather accurate facts from the site. Pranksters have been known to declare healthy celebrities dead, to include racy anecdotes in the biographies of saints, and to become a virtual mourning site for the recently deceased.

Wikipedia is now attempting to rectify this situation without overly censoring their large number of public authors. This article mentions that “at-risk” sites, such as Michael Jackson’s page, are more tightly monitored than others in some countries, and now Wikipedia is trying to take this security a step further. For the next few weeks, all additions and modifications to standing Wikipedia pages will have to be approved by a moderator before they are added to the web page. If the system seems to go well, it could become a standard Wikipedia security measure.

Hopefully, this procedure will weed out the pranksters and hoax-starters and leave behind a cleaner, more accurate website. However, there is also a chance that the moderators may wipe out some of the more interesting and little-known facts that make Wikipedia such an interesting website. Hopefully a balance can be struck that will be beneficial to all.

Web Design Tips: List Styling

Tuesday, March 24th, 2009

Lists are a great way to display a group of items with simple and efficient HTML markup. In HTML, there are three different types of lists, each suited for different tasks.

First let’s look at the definition list. The purpose for this list is, as the name says, for definitions. While it isn’t not used too often, this list is good for things such as glossary pages. The markup consists of three tags; the list starts with the <dl> tag, each term in the list starts with the <dt> tag, and each definition starts with the <dd> tag. Here is an example of what the markup looks like…

<dl>
	<dt>Term 1</dt>
	<dd>This is the definition for term 1</dd>

	<dt>Term 2</dt>
	<dd>This is the definition for term 2</dd>
</dl>

Next up is the ordered list. The ordered list is a simple list with each item numbered. The list begins with the <ol> tag and each item starts with the </li> tag. The markup for an ordered list will look something like this…

<ol>
	<li>First item</li>
	<li>Second item</li>
	<li>Third item</li>
</ol>

…and the output for this markup would be…

  1. First item
  2. Second item
  3. Third item

Now it’s time for the unordered list. This is the most commonly used list since it is the general purpose list. The markup is similar to the ordered list, except the list starts with the <ul> tag instead of the <ol> tag. List items still use the <li> tag. Here is the markup for the unordered list…

<ul>
	<li>First item</li>
	<li>Second item</li>
	<li>Third item</li>
</ul>

By default, the unordered list has solid black bullet points, like this…

  • First item
  • Second item
  • Third item

Using some of the techniques discussed in my post about CSS basics you can alter the appearance of the list to match the rest of your site’s design.

In this example we are going to change the default bullet point to a custom one. We can do one of three things with the bullet point; we can change it with a preset type (such as square, disc, or circle; for a full list of types click here), we can change it with a custom image, or we can remove it completely. Let’s replace this disc with the image of a check mark (check Web Design Tips: List Styling). To do this, we will make a class, named checklist, for the list and edit the list-style-image property for that class. The CSS for this would be like this…

.checklist {
	list-style-image: url('images/check.png')
}

The url can point to the location of the image on the web server or it can point to an image hosted on another server, which would look like this…

.checklist {
	list-style-image: url('http://www.google.com/check.png')
}

Now we write our HTML markup for the list using the checklist class…

<ul class="checklist">
	<li>First item</li>
	<li>Second item</li>
	<li>Third item</li>
</ul>

And here are the final results…

  • First item
  • Second item
  • Third item

These changes may be combined with other CSS techniques such as padding, margins, or font color to customize your lists even farther. If you have any questions be sure to leave a comment or email me and I will try to cover it in my upcoming tutorials.

Web Design Tips: CSS Basics

Monday, February 23rd, 2009

Cascading Style Sheets (CSS)…it sounds complicated, but it is simple, yet powerful. With a few lines you can transform a plain black-on-white web page into nice looking layout.

For those who aren’t familiar with the term, CSS is a language used to style your HTML by making declarations for various selectors. A selector may be a class, an id, or a predefined HTML element such as p, a, h1, div. Classes and ids are similar, but an id should only be used once throughout the page while a class can be used many times. Classes and ids are used to specify an HTML element within your code.

Let’s take a look at some HTML using a class and an id…

<p>This is a standard paragraph block</p>
<p class="some-class">This paragraph is using a custom class</p>
<p id="some-id">And this one is using an id</p>

Now that we’ve got our HTML we can style it using CSS. First I am going to set all paragraph elements to have 12pt and red text. Then I will change the background color of any elements using the some-class. And finally I will add both margin and padding to the element with the id of some-id. This code will go inside of <style> tags in your head section or in a separate .css file.

/* an HTML element */
p {
	color: red;
	font-size: 12pt;
	}

/* a custom class */
.some-class {
	background: blue;
	}

/* a custom id */
#some-id {
	margin: 10px;
	padding: 5px;
	}

The results should look something like this…

This is a standard paragraph block

This paragraph is using a custom class

And this one is using an id

Next time we will go deeper into CSS and learn some intermediate tips and tricks to help stylize your content. If you have any questions be sure to leave a comment or email me and I will try to cover it in my upcoming tutorials.

 

About Promoting Group

Who We Are: Promoting Group is an internet marketing company whose priority is to make your organization rise above the competition. We are a group of talented and dedicated individuals with a passion for marketing and demonstrated skill in public relations and search engine optimization. We will custom-tailor marketing strategies that are right for you and ...

Read more