Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

My default layout in Rails projects (See related posts)

Writing a new layout from scratch gets boring, so I have a generic / default layout to use and extend from.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><%= @page_title %></title>
	<%= stylesheet_link_tag "main" %>
	<%= javascript_include_tag "prototype" %>
	<%= javascript_include_tag "scriptaculous" %>
	<%= javascript_include_tag "general" %>
	<!--[if lt IE 7.]>
	<script defer type="text/javascript" src="/javascripts/pngfix.js"></script>
	<![endif]-->
</head>

<body class="<%= @body_class %>">
	<div id="container">
			
	<%= @content_for_layout %>

	</div>
</body>
</html>


pngfix.js is available here.

Comments on this post

saiko posts on Mar 12, 2006 at 07:15
If you use an 8 bit png palette you don't need to use the transparency fix (pngfix.js) need for M$ browsers.
uberkorp posts on Mar 18, 2006 at 23:11
...but then you don't get alpha transparency... which is the point of using the fix :P

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts