Archive for October, 2004

min-height hack for IE

If you do table-less designs with CSS, you may have noticed that using float on a DIV won’t push it’s container DIV down, so that the container is at least the same height as the floater. For example, on this Blog, the right navigation is formed using float:right but I was having problems when the text in this box was shorter than the content of my nav bar.

In IE you can use height on the container, but in Firefox, once the content of that container is too long, it runs outside the borders. In Firefox, you can use min-height, but IE doesn’t recognize it. IE actually handles height the same way firefox handles min-height. So I found a “hack” to make it work in both browsers:

#container{min-height:500px}
* html #container {height:500px}

I’m not really sure why it works, but quite frankly, I don’t care.

Bookmark and Share

29 Responses  |  add yours »

Welcome!

Hello, and welcome to this blog. I built this blog with PHP, MySql, and CSS using Dreamweaver. This, and all of my personal sites are hosted from my house on a Mandrake 10 Linux machine.

It’s not my intention to drone on about my personal life or useless information, but rather it is my intention to document my frustrations as a web developer/designer. Any time I am having problems with anything I’m working on, I plan to write it here along with the solution. More often than not, I’ll try to post things that I’m having a hard time finding the solution to on the internet. The idea is to get the solution out there for others who may be having the same questions. It will also give myself a place to go when I know I’ve worked on a problem before, but I can’t remember how to fix it.

Your feedback via email is welcome. Enjoy!

Bookmark and Share

No Response  |  add yours »

Search