CSS: Unique Button Hover Treatments by Device Size

Andrew Park
1 min readJun 24, 2018

--

The Challenge: Create different views for interactive buttons depending on device screen size. The design firm wants large text buttons to change color and text on hover for the larger screen sizes (tablets and up) vs. a static mobile view incorporating various font sizes and colors.

Desktop View: Static buttons
Desktop View: LEARN button on mouse hover
Mobile View

The Solution:

  1. Create two HTML structures for each button — one for mobile, one for bigger screens.

2. Style the mobile button to spec. Use pseudo CSS to create button effect for large screen buttons. Account for different breakpoints in relation to font sizes.

--

--

Andrew Park
Andrew Park

Written by Andrew Park

Into: Software, E-Commerce, Digital Marketing. Former & future journalist. Kid from Queens.

No responses yet