Html Minimum Attributes
I'm working on pages whose content area's size changes according to the amount of content within it. The problem with this is if there isn't enough content in this area, it's area
Solution 1:
In CSS2 compatible browsers you can use min-height: http://www.w3.org/TR/CSS2/visudet.html#min-max-heights
Though for non-compatible browsers (ahem IE6) you'll have to find another way to implement it.
You can see css property compatibility here: http://www.quirksmode.org/css/contents.html
Solution 2:
Firstly, you ought to know the following:
- Content belongs in HTML (Model)
- Styles belong in CSS (View)
- Interactions belong in JavaScript (Controller)
CSS can be placed within HTML in style
attributes, although it should be avoided unless necessary.
The CSS property min-height
does what you're looking for, although doesn't work in IE6. There is a fix for IE6, it goes as follows
.yourstyle
{
height: auto !important;
height: 500px;
min-height: 500px;
}
Make sure your height
and min-height
values are identical.
Post a Comment for "Html Minimum Attributes"