MainelyDesign.com Blog

Hack Tagged Blog Posts

Best Way To Get Transparent PNGs Without Any Hacks

Posted on 10/21/2012 at 10:27 am | Viewed 13,564 times | 0 comments

I avoided PNG images for quite a while, mainly because I could accomplish almost every task with transparent GIFs (if not, I could change the design ever so slightly).  Fast forward a few years and web designs are far too complex and textured to only use transparent GIFs, plus it's so much cooler to say "ping" than "gif".  Another reason I avoided using transparent PNGs was due to the ability to make IE (Internet Explorer) crash (suprise!).  Finally, I avoided using PNG images on my website because their filesize was ridiculous (what I could do in 10kb using a Gif, would take 71kb as a PNG).

Best PaginateCount for CakePHP - with Group By Support

Posted on 08/07/2011 at 05:03 pm | Viewed 19,547 times | 0 comments

I'm been muddling my way through pagination with multiple joins, and complex filtering.  I finally got it all working (more on that later, maybe....) when I noticed that I couldn't paginate my results.  Everything was working fine until I added a "group" parameter to the find call.  Instead of getting the right count, I got a count of 1!  A quick look at my sql log tables (at the bottom of the page) and I saw that I had actually returned all the mysql records that were needed!  If only there was a way to use them...

Best CSS Method for Using Image as Submit Button

Posted on 02/03/2010 at 12:17 pm | Viewed 21,130 times | 2 comments

I came across an interesting issue with web forms and CSS.  Surprisingly, the end result is much better than I expected.  I knew that using an image instead of a traditional form submit button (<input type="submit">; instead of <input type="image"> or <input type="button">) would be a little challenging.  I like a challenge, plus I wanted to use the submit button because it's the standard approach to forms and I remember reading somewhere that input's of type image or button do not submit when you press enter...a usability faux paus in my opionion.

Using Jquery for target="_blank" and strict xHTML

Posted on 12/28/2009 at 03:27 pm | Viewed 14,948 times | 0 comments

If you like to see the little green check mark that HTML Validator shows when your HTML is 100% valid, you'll love this little trick. Thanks to badlydrawntoy.com

CSS Min-Height Hack in Internet Explorer

Posted on 12/15/2009 at 10:18 am | Viewed 13,944 times | 0 comments

Another day of web developing with CSS and another day of needing a hack for IE6 and IE7.  This isn't really a hack so much as it's a method of ordering statements in your CSS declaration that yields a working min-height declaration in Internet Explorer.  Well, I guess it's a hack (but I hate using them).

CSS min-height will be used in browsers that support it

Faking Symlinks on Windows 2003

Posted on 09/17/2009 at 04:25 pm | Viewed 17,015 times | 0 comments

My production server is a LAMP server.  I love it.  I have one cental location for my CakePHP application and symlink the folders I need to each individual hosting account.  It's pretty easy to do and very powerful.  I work on another server that is Windows 2003.  Everytime I sit down to do work, I bemoan not having the ability to create symlinks.  Turns out there is a way...

Using Exif in PHP on Windows

Posted on 08/28/2009 at 09:40 am | Viewed 12,255 times | 0 comments

I'm trying to use the exif functions in PHP on my Windows XP computer.  I want to read the meta data that is recorded by my digital camera (exif - exchangeable image file format).  I like the idea of storing that exif data in the database, so it's searchable. I wasn't having any luck with exif_read_data(), but finally found this posting.

TinyMCE Doesn't Work in IE8

Posted on 07/24/2009 at 11:54 am | Viewed 26,385 times | 4 comments

I was training a client how to update their web site using Site Avenger when the strangest thing happened- no copy was showing in TinyMCE.  No matter what I pasted the tiny editor would remain a nice, plain white.  I didn't think to try typing directly into TinyMCE.  No matter, a click on the HTML button to view the source revealed the content was in fact there, just not being shown within the TinyMCE editor.

Phantom Whitespace Below Img in Firefox

Posted on 07/22/2009 at 10:24 am | Viewed 12,432 times | 0 comments

I've come across this thing a few times before- there's a strange space below images in Firefox, but not in IE.  I finally found a nice explanation as to why it happens, which I wanted to post here.

Images are displayed inline by default.  When you are using an image as a block (like when you want an image to take up the entire top half of a page) you'll get some mysterious white space below the image, but only in Firefox.  For once, IE actually seems to render the CSS appropriately.

Faking min-width CSS style in IE6 and IE7

Posted on 07/16/2009 at 01:50 pm | Viewed 12,641 times | 0 comments

It's a hack... but it's needed to make a truly cross-browser fluid layout.  It's simple, if you want to implement min-width in IE6 and IE7, use the following CSS code: (I didn't create this originally, sorry, lost the source)

/*********************
**	IE 6.0 min-width hack
********************/
* html div#contentWrap {
	width:expression(((document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.clientWidth : document.body.clientWidth) < 1000 ? "840px" : "85%");
}

Full Tag List

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design