A Web Development Blog Focused on Code and Technology
Currently Browsing: Home
Merry Christmas! Today is the day to meet up with friends and family to celebrate and rejoice. Of course, you can’t forget about those great presents under the tree!
‘Tis the Season to Give
Because Christmas is all about giving, we wanted to share the love here as well. To thank the readers of Lateral Code, we will be giving away 25 Google Wave invites for free. Entry is simple and we hope many of you will win!
When we last left off, our site was equipped with a simple templating system. Of course, the benefits mentioned in part 1 are not yet achieved. That’s why our venture must continue to build the ideal template-focused site.
Issue: DRY Coding
In our main processing file,
index.php, you may have noticed that we don’t yet follow the DRY (don’t repeat yourself) coding paradigm. That is, when we make multiple files, parts of the page such as our navigation, sidebar, header, and footer remain constant, but our pages reuse code. For example, consider the following unordered list navigation:
<ul> <li><a href="/">Home</a></li> <li><a href="/about">About</a></li> <li><a href="/portfolio">Portfolio</a></li> <li><a href="/gallery">Gallery</a></li> </ul>
Traditionally, people using colors in CSS have dealt with either the hexadecimal format, which looks like this:
#ABCDEF or the rgb format, which looks like this:
CSS3 comes with a few new ways of manipulating colors, such as using HSL (Hue, Saturation, Light) and opacity/alpha-channels. Unfortunately, only Firefox 3+, Opera 10+, Chrome 1.0+ and Safari 3+ and a few derivatives fully support these at the moment, but we make do with what we can, seeing as Internet Explorer doesn’t even start supporting CSS3 elements until Internet Explorer 9.
Have you ever had to deal with a sloppy site? Maybe it was when you were working with a client. Or could it be your own site, which you formatted poorly because of inexperience? Regardless, there is a simple yet efficient way to make your site based completely off a template. All it requires is a bit of htaccess and some PHP.
Time for some incentive
This will be a multi-part tutorial in which we explain how to completely transform your site into an organized beast. Today’s section will focus on a few lines of .htaccess that you will soon come to love. But, before we begin, let’s go over a few advantages and some incentive for creating a template-focused site.
By Karthik Viswanathan on Saturday, November 14th, 2009 | No Comments »
We would like to take some time to praise our sponsors located in the sidebar. These people keep Lateral Code up and running! We do our best to provide quality articles in order to make their investments worth it.
Here are our current advertisers:
xhtmlchop – Xhtmlchop provides PSD to XHTML conversions for only $45. If you ever need to a Photoshop theme conversion, consider xhtmlchop as a solution. We would like to especially thank them for their continued support over multiple months!
Ceaser Hosting – Ceaser Hosting provides the option of both VPS or shared hosting at reasonable prices. Head over there to see the choices you have!
Thanks again and we hope that you will continue to choose Lateral Code.