Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Wednesday, January 7, 2009

Another IE z-index bug workaround tip thingy

If you're having trouble getting z-indexes to work right in IE, the order of your style declarations in your css file might matter. Try putting the style code for the element you want to stack on top at the bottom of your css file and see if the problem persists.

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*/
}

Monday, December 3, 2007

Min-height fast hack (IE6 sucks)

Blatantly plagiarized from http://www.dustindiaz.com/min-height-fast-hack/:

selector {
min-height:500px;
height:auto !important;
height:500px;
}