Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Responsive hero image with text overlay? Reply To: Responsive hero image with text overlay?

#166323
paulob
Participant

Are rem’s better for responsive or it’s just for specific layouts such as this one?

Rems are just another tool in the toolbox. :)

Rems are great for consistent measurements throughout the page and avoid the compounding issues of em measurements.

It does all depends on the layout in hand though as you may want to build your page so that each element has a relationship with the parent element rather than the root element.

If for example you decide a section needs a change of size with ems you could just change the parent’s size and all the children will scale with that parent (assuming ems had been used for all children) and maintain the correct relationship with the parent’s size. However if you had used rems and you changed the parent’s size then only the parent changes its size but now all the children may be too big or small because they still refer to the viewport.

As usual with CSS there is no one right way to do something because it does depend on the job in hand.