Archive for May, 2008

Cool font for Windows XP

Saturday, May 24th, 2008

If any of you are using Windows for developing, you might know that the XP fonts are kind of annoying to the eye. Vista introduced Consolas and are now offering it for download.

It’s a highly legible font and it pleases my eyes.

It also looks much better with ClearType activated. ClearType can be turned on by going to the Control Panel, double-clicking the display icon, going into the appearance tab and selecting effect. The second listbox there should let you choose ClearType.

It’s pretty much eye orgasms.

CSS fluid layout with sidebar

Monday, May 19th, 2008

So it seems that a lot of people are trying to achieve this. More and more people are becoming aware of CSS and its awesomeness and I think it’s about time. We’re not in 1996 anymore.

Then, getting a nice horizontally fluid layout isn’t very easy for most. If you try pixel widths, you can’t make it fluid, if you use percentages, borders start to mess things up and it’s not sharp enough.

I’ve found this solution on the internet, though I can’t remember where.

Here is the html:

<body>
    <div id="sidebar">
        Your sidebar here, menu, whatever
    </div>
    <div id="content">
        Your content, headers, all kinds of fun.
    </div>
    <div id="footer">
        footer text.
    </div>
</body>

And here is the CSS:

#sidebar
    {
     width: 250px; /* whatever width you want in pixels or % */
     float: left;
    }
#content
    {
     margin-left: 250px; /* same as the #sidebar width or more if you want space */
    }

And there you have it. You can mess around with width and all that. You just have to make sure that your next div (#footer) is cleared on both sides (clear: both;) or your content might be over the next divs.

So that’s it. Now you only have to have designer talents and you can build awesome sites with sidebars. You can easily add a sidebar on the right with the same method, but floating your div on the right. My sidebar is currently working that way, you can look at the code.

Have fun with it.

Tag testing

Monday, May 19th, 2008

I’m just trying out some tags here to set up the CSS.

And here is some ruby code in a pre tag:

1
2
3
4
@accounts = Account.find(:all)
if @accounts.nil? or @accounts.empty?
    @accounts = []
end

Here we go

Thursday, May 15th, 2008

So I don’t really want to derail this blog with random stuff. But let’s just say that I picked up a really, really nice friend tonight. She is beautiful.
Oh yeah

New blog!

Wednesday, May 14th, 2008

Just a placeholder until I take the time to set everything to my tastes.
So here it is. A real Wordpress blog because even though I thought about coding my own, I have other - more important - things to do.

So on this blog, I’ll post about stuff that I care about, mostly programming thoughts and solutions. Occasionally, I might post nonsensical rants, just because. I hope I get some readers!