height attributes & streamlining css
Posted: Thu Mar 04, 2010 9:05 pm
So this post can be broken down into two questions.
The first:
Is there a way to streamline my CSS code so that two elements can have exactly the same make up except for one? It seems like there must be a better way than having everything written out twice.
A simple example,
.shadow_left {
float: left;
height: 100%;
width: 10px;
background-color: #999999; }
.shadow_right {
float: right;
height: 100%;
width: 10px;
background-color: #999999; }
The second question:
I noticed that when I define a div to have a 100% height, in Firefox it limits the height to that of the browser and in IE, it extends it to match the content. Is there an easier way to define height so that it extends with content, while also having a minimum height?
The first:
Is there a way to streamline my CSS code so that two elements can have exactly the same make up except for one? It seems like there must be a better way than having everything written out twice.
A simple example,
.shadow_left {
float: left;
height: 100%;
width: 10px;
background-color: #999999; }
.shadow_right {
float: right;
height: 100%;
width: 10px;
background-color: #999999; }
The second question:
I noticed that when I define a div to have a 100% height, in Firefox it limits the height to that of the browser and in IE, it extends it to match the content. Is there an easier way to define height so that it extends with content, while also having a minimum height?