ASP.NET Cafe
Tips and Tricks

CSS: min-height everythere

Friday, 14 December 2007 01:24 by Dmitriy

Recently was an article on Digg... "Don't use CSS ever" or something like this... Opened link - just another SEO company. So, I decided to write post about CSS.

Sometime you need a block elements that should be specified size, but if there are more content - grow vertically. Basically, this is a frequent trouble for peoples who works long time with IE and then see the problems in Firefox.

Here is my little css:

 _height: 458px; /* IE 6 only */
 min-height: 458px;
 display:block;

That's all. All good browsers support min-height and IE uses "height" like min-height, but just need to make it IE-only, so we are using "_height" attribute.

Currently rated 4.3 by 3 people

  • Currently 4.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   CSS
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (2) | Comment RSSRSS comment feed

Comments

January 10. 2008 15:58

Rob

Please dont use hacks!
Why not load a conditional Css File using ie conditional comments for IE?

http://www.quirksmode.org/css/condcom.html

Read on it

Rob

July 1. 2008 12:56

Brett

Right!Thank you

Brett

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Preview

December 4. 2008 11:11