Define Database Size
You can set Maxsize on both the data and the log files of your database.
If the Max size of your database is 20GB you have to make sure the combined max size of both is 20 GB.

Remember to allocate enough room for the log file, so you don't run into issues early on.

You can do this by going into SSMS, right click your database, properties and go to Files.
If you want to script it, it can also be done.
Take a look at the BOL to find the syntax :   ALTER DATABASE FILE      

Perhaps this is also useful for you:
Transaction Log Administration Best Practices