WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Web Developer CSS Question

for

From: Swift, Daniel P.
Date: Jan 16, 2018 12:33PM


We use em units for font-size and percentages for widths of containing elements. My understanding for ems on containers is that the width will grow as the text grows. So if you have a container and you want to maintain the text layout, then ems would be more appropriate. If screen layout is more important and you don't have a preference for when the text wraps to the next line, then using percentages for the container is more appropriate ... at least, that's my understanding.

I hope that makes sense!

Dan Swift
Senior Web Specialist
Enterprise Services
West Chester University
610.738.0589

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Jim Homme
Sent: Tuesday, January 16, 2018 1:58 PM
To: WebAIM Discussion List
Subject: [WebAIM] Web Developer CSS Question

Hi,
I'm learning web development, and as a totally blind screen reader user, it makes total sense to learn accessible web development as I learn, so I don't have to unlearn things. I was reading through the WCAG 2.0 Success Criteria and looking at CSS techniques. That's why I want to ask this. Should I always use em units and never use other units, or is it OK to use, for example, percentages also?

Thanks.

Jim


Jim Homme