Created
September 8, 2011 10:01
-
-
Save jensgro/1203058 to your computer and use it in GitHub Desktop.
Rechnen in CSS soll mittels calc() möglich sein.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Die Box würde so breiter als 100% werden. */ | |
#main { | |
width: 100%; | |
padding: 20px; | |
} | |
/* Ein weiteres DIV - #main_inner - übernimmt die Abstände. */ | |
#main { | |
width: 100%; | |
} | |
#main_inner { | |
margin: 20px; | |
} | |
/* Die CSS3-Version - bisher nur im Firefox und IE9 + 10 (ohne vendor-prefix) */ | |
#main { | |
width: -moz-calc(100% - 2*20px); | |
width: calc(100% - 2*20px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment