modified to use media queries and be more flexibile.