Mobile app version of vmapp.org
Login or Join
Reiling115

: Change CSS EMs to Percentage Automatically I cheated on a small site I was working on and used a site builder (Web Dwarf by Virtual Mechanics) to save time. I didn't realize it at the time,

@Reiling115

Posted in: #Css #Html

I cheated on a small site I was working on and used a site builder (Web Dwarf by Virtual Mechanics) to save time. I didn't realize it at the time, but this builder specifies the width, height and positions using CSS EMs.

Is there an automated tool out there that will read through the CSS and convert each EM to a percentage so it will display correctly on wide screens as well?

Any help would be great! Thanks.



Here is the CSS:
pastebin.de/14055

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

2 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

Try to use this tool. You need to paste your css code and it automatically convert to em, px, % or pt. But be careful, this tool has some limitations.

10% popularity Vote Up Vote Down


 

@Chiappetta492

A CSS em is calculated based on the size of the font you are using, so conversion to some arbitrary percentage value isn't something you can automate. If you wanted you could do some simple percentage calculations of your own by dividing your container element's EM width by the widths of subelements and so-on, but there is no way for an automated tool to do this sort of job.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme