So I have written two simple apps for testing:
- a syslogviewer used in our company
- web presentation for one of our customers
When dealing with CSS I ran into following issues:
- box model a.k.a. the basics
- floating of boxes a.k.a. how to position the boxes
- selectors a.k.a. how to apply styling to correct elements
I've also learned some tricks:
- To make submit buttons a bit nicer, give it a class and style the class:
submit-button{
border:1px solid #CECECE;
} - To avoid positioning problems put any dimensions in outter element. For example to center one element inside another:
#outter{ width: 80px; height: 50px; }
#inner { margin-left: auto; margin-right: auto; padding-bottom: 20px;} - When two columns with different height need to look the same size, use the container with background set to image with "1px height repeat-y" atribute. With this technique one can create table looking layout. Nicely described at http://www.alistapart.com/articles/fauxcolumns/
#container {
background:transparent url('/images/background.gif') repeat-y;
}