A fundamental question when creating web pages is whether the layout will have a fixed width or whether it will be able to expand and contract depending on factors such as the width of the browser window (or viewport). Fixed-width, pixel-based layouts are predictable but not very adaptable to changing browser conditions. Fluid (or liquid) layouts—even with a minimum and maximum width set—are harder to control, especially if the design requires features like a full-width header image. Em-based designs—especially when combined with some fluid elements—in a sense combine the both of best worlds…
Read more
A web content management system (CMS) provides a means for creating, editing, organizing, archiving and searching content on a website. Short of creating a CMS oneself, there are many CMSs available for ready use—many for free, others for a price.
The question is, Which one to choose? The purpose of this post is to begin the process of sorting the various CMS offerings into conceptual groups, and to consider reasons for choosing one over another.
Read more
Recently I wanted to add some bookmark links to my pages—such as those you see at the bottom most blog posts—so I tried a few services like those provided by AddThis and ShareThis.
Being a bit of a purist, I didn’t like the yucky JavaScript code that was thereby added to my pages (and, in the case of AddThis, even some ghastly Flash code too). So I started to look around for some cleaner alternatives. In the end, I came up with my own solution. It’s far from high-tech, but I’ll offer it here in case anyone is interested.
Read more
Normally, if you want to run PHP scripts on a web page you will give that page a .php file extension. Otherwise, the PHP script will not be parsed (or executed). However, if the page already exists with a .htm or .html file extension, it may not be convenient or desirable to change the extension.
Fortunately, there is a simple alternative to changing the file extension. You can instead add a simple instruction to a .htaccess file, as this post demonstrates.
Read more
The float property of CSS is a powerful way to lay out the elements of a web page. When an element is floated, it is “taken out of the document flow”—meaning that the other elements (for the most part) act like it’s not there—and this can cause some unexpected layout results. Floats often need to be “contained”; and, fortunately, there are some easy ways to do this, as demonstrated in this post…
Read more
I was quite interested to find this old web article on the distinction between Grammar and Usage. The author acknowledges that the definitions offered in the article are somewhat “tendentious”, but they are interesting food for thought.
Read more
An external style sheet allows all of a site’s styles to be controlled from one point—which makes for very efficient page layout and design.
“PHP includes” can be used in a similar way to external style sheets, in that elements appearing on multiple pages can be controlled from one location. For example, it is common to have a menu on every page of a website. If you want to update that menu—such as adding a new menu item—it will be a nightmare to do this if you have to open every page on your site to alter each instance of that menu.
Read more
When typing in a word processor, you can easily add in all sorts of characters or glyphs like &, <, > and so on—basically whatever characters are contained within the fonts on your computer. It’s not necessarily so simple when you are authoring a web page. There are some extra considerations to take into account to ensure that all characters appear as intended.
This post provides a simple introduction to character encoding, character references and entity references, so that you will be able to add any character to your web page with confidence.
Read more
Since the early 2000s there has been a strong push to adopt XHTML over HTML. There are many reasons given, and some of the arguments (at least on the surface) are quite compelling. But to be honest, I’ve never been all that convinced, and recently I decided to abandon XHTML in favor of HTML. I thought I should explain why…
Read more
Typically, blogging software (like WordPress) and content management systems come with built-in RSS feeds that update automatically.
But what if you have a simple site without either of these, and you would like to provide an RSS feed? Knowing nothing about RSS myself, I decided to have a go at creating my own simple RSS feed. It turned out to be very easy, as this post explains…
Read more