A little about Vernon...

Hey there everybody, I’m Vernon. I’ve been a full-time freelance web designer since 2002 and can honestly say it’s been a great journey.

If you’re interested, take a look at my services site and let me help you with your project.

You are currently browsing the archives of the Development Tips category.

0

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

MiniAjax is a very nice collection of some great DHTML and Ajax scripts. It’s not a huge collection but the pieces available are bits that would be useful across a number of websites.

Just a few of the scripts include:

  • Prototype Window which allows you to add a window in a HTML page.
  • Ajax Star Rating Bar that allows users to rate things with no page refresh.
  • A drop-in Ajax contact form that can be used in WordPress.
  • Ajax powered IM system that sits right on your web site.
  • Ajax domain search script

Like I said, a very nice collection with some helpful bits that you could use on various websites.

0

Recently in my stat logs I've been getting a lot of visitors coming from a search for "CSS Fixed Layout". Generally they've been hitting this post where I wrote about ___layouts. So I decided to take the time to put together a simple fixed CSS layout tutorial for those finding the site looking for it.

First, we'll start with the layout of the divs for the layout. For this example, I've chosen to take a standard type layout with a header, two columns and ending with a footer. The layout will be centered on the screen and the columns will have the appearance of being the same height.

HTML:
  1. <div id="main_cont">
  2.     <div id="page_head">
  3.         <h1>This is our site heading!</h1>
  4.     </div>
  5.     <div id="side_col">
  6.    
  7.     </div>
  8.     <div id="main_col">
  9.    
  10.     </div>
  11.     <div id="page_foot"></div>
  12. </div>

So there's our easy and simple layout. Because this is to show you how to do a fixed width CSS layout, we'll set the width at 770px. Let's get the CSS now...

CSS:
  1. body {
  2.     margin: 0 0 25px;
  3.     padding: 0;
  4.     background: #333;
  5.     text-align: center; /* centers for IE */
  6. }
  7. #main_cont {
  8.     margin: 0 auto; /* centers for Firefox and others */
  9.     width: 770px; /* sets width of main container */
  10.     background: #fff;
  11.     background-image: url(bg-grey.gif);
  12.     background-attachment: scroll;
  13.     background-position: left;
  14.     background-repeat: repeat-y; /* these are for the illusion of equal height columns */
  15. }
  16. #page_head {
  17.     background: #777;
  18.     color: #fff;
  19.     height: 100px;
  20.     padding-top: 10px;
  21.     text-align: center;
  22. }
  23. #side_col, #main_col {
  24.     float: left; /* this places the side_col on the left of the page to place it on the right just change float: left to float: right */
  25. }
  26. #side_col {
  27.     width: 180px;
  28. }
  29. #main_col {
  30.     width: 570px;
  31.     padding: 10px;
  32. }
  33. #page_foot {
  34.     background: #777;
  35.     height: 15px;
  36.     clear: both;
  37.     display: block;
  38. }

Now, for the extended columns you'll notice I used a background image in the main container image to create the illusion of equal height columns. This is only one solution to equal height columns using CSS.

Take a look at our example in action!

Please keep in mind that this example is not about the way it looks but to give you an easy example of how to achieve a fixed CSS centered layout.

0

swfIR: swf Image Replacement
February 27th, 2007

The team of Jon Aldinger, Mark Huot, and Dan Mall have released swfIR to bring in swf Image Replacement.

swfIR (swf Image Replacement) is here to solve some of the design limitations of the standard HTML image and its widely-accepted associated CSS values, while still supporting standards-based design concepts. Using the dark arts of JavaScript and Flash, swfIR gives you the ability to apply an assortment of visual effects to any or all images on your website. Through progressive enhancement, it looks through your page and can easily add some new flavor to standard image styling.

Using swfIR is easy by just using the natural ability to style regular images. Because of browser inconsistencies, swfIR will add a <span> with a class of swfir around the images being replaced.

Want to check out a couple examples?

While you are at it, don't miss out on Dan Mall's first ALA submission, Semantic Flash: Slippery When Wet.