Monday, December 29, 2008

Followup: IE6 PNG Alpha Transparency Fix

I, like many others, ran into the issue of <a> links not being click-able when they sit on top of an element upon which the alpha fix has been run.


A hint I got off of this site gave me the answer I was looking for: The element containing the filtered png must not have a position set, and the links within that element must have a position set.

Thursday, December 4, 2008

Vertically & Horizontally Centered <div>

Ran across this beautiful CSS example of a perfectly centered <div>:


#mydiv
{
position:absolute;
top: 50%;
left: 50%;
width:30em;
height:18em;
margin-top: -9em; /*set to a negative number 1/2 of your height*/
margin-left: -15em; /*set to a negative number 1/2 of your width*/
}