Posted by Will on Thursday, June 12, 2008 at 4:11 PM

FamFamFam IconsThis another Frankenpost from the previous version of the blog, but I'm adding new content to the end.

Mark James over at FamFamFam has made available to the public a free set of 1000 icons (nope, that's not a typo) called Silk.  It's just one of three currently available.  As you can see from this preview, the icons are high quality.

Here's the new part:
The reason I found the FamFamFam collection was that I needed some icons for HappyFish.  I love the collection and have spent so much time looking at them that I can spot one instantly.  That's why when I updated my installation of twhirl I recognized one of the FamFamFam icons on a little dialog advertising a new feature.  ScrewTurn Wiki makes use of them too.  I'm going to be using ScrewTurn for the new HappyFish wiki.  As for twhirl, I recommend it as a desktop Twitter client.  It has integration with FriendFeed which is a nice bonus.

Comments [0]     Categories: Web Design | WinForms              
Posted by Will on Thursday, June 12, 2008 at 2:28 PM

This is a Frankenpost - it was on the blog before I migrated from Community Server to DasBlog.  It's one that I find useful so I'm porting it over.

Here's something I cobbled together as a replacement for a frameset. The technique takes advantage of the overflow CSS property applied to the HTML doc and a div within it to achieve the appearance of a frameset.  I used it in a MasterPage scenario, but it would work on a single page just as well. 

First you need to structure your page something like this:

<body >
    <form id="form1" runat="server">
        <div class="divHeader" id="masthead">
            This is the header
        </div>
        <div id="divPlaceHolderWrapper">
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server" />
        </div>
    </form>
</body>

Your CSS should look like this:

body, html {
    overflow: hidden;
    font-family: Arial, Sans-Serif;
    margin: 0;
}

.divHeader {
    background-color: Gray;
    color:White;
    font-size: 2em;
    font-weight: bold;
}

#divPlaceHolderWrapper {
    overflow: auto;   
}

Hiding the overflow for the HTML has the effect of removing the scrollbar from the browser window.  We add it back to our div

And you'll need this JavaScript (which I found here):

<script language="javascript" type="text/javascript">
    function GetWindowHeight() {
        var myHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ){
            //Non-IE
            myHeight = window.innerHeight;
        }
        else {
            if ( document.documentElement && ( document.documentElement.clientWidth ||    document.documentElement.clientHeight ) ){
                //IE 6+ in 'standards compliant mode'
                myHeight = document.documentElement.clientHeight;
            }
            else {
                if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                    //IE 4 compatible
                    myHeight = document.body.clientHeight;
                }
            }
        }
        return myHeight;     }
    function SetPlaceHolderWrapperHeight() {
        var wrapperHeight = GetWindowHeight() - 37;  //the height of the lower edge of the browser window
        document.getElementById('divPlaceHolderWrapper').style.height = wrapperHeight + 'px';
    }   
    window.onload = function() { SetPlaceHolderWrapperHeight(); }
    window.onresize = function() { SetPlaceHolderWrapperHeight(); }
</script>

The resulting page will show the contents of the divPlaceHolderWrapper (in this case - whatever is in the content area of the page using this MasterPage) with a scrollbar if necessary.  If the content does not fill up the window, then no scrollbar appears.  While resizing the browser window in IE divPlaceHolderWrapper is continuously resized.  In Firefox the div is resized once the resizing of the browser window is complete.

Comments [0]     Categories: asp.net | CSS | Web Design