lime icon

Phosphorus and Lime

A Developer's Broadsheet

This blog has been deprecated. Please visit my new blog at klenwell.com/press.
CSS: IE-specific styles
I thought I has already posted something on this, but I guess not. Found a couple simple ones

hanging comma hack
.ie_only,
{
background:blue;
}

source: andcuriouser.com

underscore hack (applied to the attribute)
.ie_only
{
text-align:left;
_text-align:center; /* IE only */
}

source: wellstyled.com

The inverse (to apply a rule selectively to non-IE browsers -- not sure if it's Mozilla-specific or CSS2-specific or just IE-specific or what):

html>body hack
html>body .not_IE
{
text-align:left;
}


keywords: CSS, stylesheet, hack, conditional, IE, ie, browser-specific
Spam Control: Amazon Forum Spam
Noticed this on slashdot today:

Save yourself $5.10 by buying the book here: Micro-ISV: From Vision to Reality [amazon.com] (you even beat the B&N member price). And if you use the "secret" A9.com discount [amazon.com], you can save an extra 1.57%!


You have to hit the tinyurl link in the reply to fully appreciate it.

Anyway, it led me to wonder about the anatomy of an Amazon URL. This is the closest I found (on a single Google search) to an explanation:

Hack Averts Amazon Referrals [wired.com]

Don't know if the hack still works. The article appeared back in 2000.

(Full disclosure: I have an Amazon tag myself -- it's never made me any money. Wonder how much this kaleidojewel guy is raking in.)

By the way, the book sounds useful, as do some of the comments.
Recommended PHP reading list
From IBM via slashdot:

http://www-128.ibm.com/developerworks/opensource/library/os-php-read/

Note well: security

keywords: php, security, books, slashdot
CSS: new style sheet template
Simple enough, but I have found having this makes it much easier for me to organize my css.

/** Documentation **/
/*______________________________________________________________________________

AMVC Stylesheet Template

Last Update: Mar 2006
Author: Tom Atwell (klenwell@gmail.com)


NOTES:

See bottom for helpful references.

______________________________________________________________________________*/



/* BASIC LAYOUT */
/*____________________________________________________________________________*/

html
{
/* height:100% */ /* for page centering, uncomment (see http://www.quirksmode.org/css/centering.html) */
}
body
{
/* height:100% */ /* for page centering, uncomment */
margin:0; padding:0;
font-family:Arial, Helvetica, sans-serif;
color:#CCC;
background-color:white;
}
#page
{
}

/* Links */
a
{
color:#ffa500;
text-decoration:underline;
}
a:hover
{
color:lime;
text-decoration:none;
}

/* Headers */
h1, h2
{
margin:0 0 4px;
}

/*____________________________________________________________________________*/



/* SUBSECTION */
/*____________________________________________________________________________*/



/*____________________________________________________________________________*/



/** References **/
/*______________________________________________________________________________

CSS Reference (w3schools.com)
http://www.w3schools.com/css/default.asp

Page Centering with Valid CSS (quirksmode.org)
http://www.quirksmode.org/css/centering.html

Jigsaw CSS Validator (w3.org)
http://jigsaw.w3.org/css-validator/

World Wide Web Consortium Home Page (w3.org)
http://www.w3.org/

______________________________________________________________________________*/


To validate: Jigsaw CSS Validator

keywords: css, stylesheet, templates
An Anonymous Coward No More
Finally opened up a slashdot account. I was going to wait and try to be their one-millionth account. But who knows, the whole site might crash when that happens.
testing linkback
http://bloggeritemcontainer.blogspot.com/2006/03/mission-statement.html
HTML: Blogger Template
Started a new blog with the purpose of demystifying as much as possible the Blogger template:

http://bloggeritemcontainer.blogspot.com/
HTML: Anatomy of a Blogger Post Array
Been meaning to do this for some time. The templates and help provided by Blogger seem a bit too cluttered to me. So trying to make this as simple and elegant as possible:

<!-- BLOGGER POST ARRAY -->
<div id="blogger_post_array">
<Blogger>

<!-- BLOGGER ITEM TEMPLATE -->
<div class="blogger_item">

<!-- date header -->
<BlogDateHeader>
<div class="date_header"><$BlogDateHeaderDate$></div>
</BlogDateHeader>
<!-- end date header -->

<!-- ITEM title -->
<a name="<$BlogItemNumber$>"> </a>
<BlogItemTitle><div class="item_title">
<BlogItemURL><a href="<$BlogItemURL$>"></BlogItemURL><$BlogItemTitle$></a>
</div></BlogItemTitle>
<!-- end ITEM title -->

<!-- ITEM body -->
<div class="item_body">
<$BlogItemBody$>
</div>
<!-- end ITEM body -->

<!-- ITEM footer -->
<div class="item_footer">

&raquo; <a href="<$BlogItemPermalinkURL$>" title="permanent link"><$BlogItemDateTime$></a>

<MainOrArchivePage><BlogItemCommentsEnabled>
<a href="<$BlogItemCommentCreate$>" <$BlogItemCommentFormOnClick$>> <$BlogItemCommentCount$> comments</a>
</BlogItemCommentsEnabled></MainOrArchivePage>

</div>
<!-- end ITEM footer -->

</div>
<!-- end BLOGGER ITEM TEMPLATE -->


<!-- ITEM PAGE BLOCK (displayed only on post's item page) -->
<div id="item_page_block">
<ItemPage>

<!-- ITEM COMMENT ARRAY -->
<div class="item_comment_array">
<BlogItemCommentsEnabled>

<a name="comments"></a>
<h4>Comments:</h4>

<!-- ITEM COMMENT -->
<BlogItemComments>
<div class="item_comment">
<a name="<$BlogCommentNumber$>"></a>

<!-- item comment body -->
<div class="item_comment_body">
<$BlogCommentBody$>
</div>
<!-- end item comment body -->

<!-- item comment footer -->
<div class="item_comment_footer">
<a href="<$BlogCommentPermalinkURL$>" title="comment permanent link">&middot;</a>
posted by <$BlogCommentAuthor$> : <$BlogCommentDateTime$> <$BlogCommentDeleteIcon$>
</div>
<!-- end item comment footer -->

</div>
</BlogItemComments>
<!-- end ITEM COMMENT -->

<!-- javascript token? -->
<$BlogItemCreate$>

</BlogItemCommentsEnabled>
</div>
<!-- end ITEM COMMENT ARRAY -->


<!-- ITEM BACKLINK BLOCK -->
<BlogItemBacklinksEnabled>
<a name="links"></a>

<h4>links to this post:</h4>

<!-- ITEM BACKLINK ARRAY -->
<div id="item_backlink_array">
<BlogItemBacklinks>

<!-- backlink title -->
<div class="backlink_title">
<$BlogBacklinkControl$> <a href="<$BlogBacklinkURL$>" rel="nofollow"><$BlogBacklinkTitle$></a> <$BlogBacklinkDeleteIcon$>
</div>
<!-- backlink title -->

<!-- backlink snippet -->
<div class="backlink_snippet">
<$BlogBacklinkSnippet$>
</div>
<!-- end backlink snippet -->

<!-- backlink footer -->
<div class="backlink_footer">
posted by <$BlogBacklinkAuthor$> at <$BlogBacklinkDateTime$>
</div>
<!-- end backlink footer -->

</BlogItemBacklinks>
</div>
<!-- end ITEM BACKLINK ARRAY -->

<!-- backlink timestamp -->
<div class="backlink_timestamp">
<$BlogItemBacklinkCreate$>
</div>
<!-- end backlink timestamp -->

</BlogItemBacklinksEnabled>
<!-- end ITEM BACKLINK ARRAY -->


<!-- ITEM PAGE HOME LINK -->
<a href="<$BlogURL$>">&laquo; home</a>
<!-- end ITEM PAGE HOME LINK -->

</div>
</ItemPage>
<!-- end ITEM PAGE BLOCK -->


</Blogger>
</div>
<!-- end BLOGGER POST ARRAY -->


Will add stylesheet later when I have time.

For more info, see Blogger Help: Template Walkthrough