Comparative study of size effects in solid and liquid films