Add responsive layout support

Many people need a responsive layout solution, so I changed some codes to support this feature.
It doesn't need to change any codes using the previous version codes.

Please help to review the codes and any problem please let me know.

Thanks,
Dennis Ji