fixed the minwidth/maxwidth and added options to obey css set min/max width