1. how to converse em to px and vice versa ?
2.How to create a background measured in em ?
#1
Aren't em measurements relative measurements? I'm not sure a straight conversion is possible; wouldn't it depend on the resolution of the image?
Maybe I'm way off base here.
#2
em is a typographic term that refers to font width and is relative to the particular font. Why do you think you need to use this measurement?
#3
It's used as a measurement in CSS. Distances measured in relation to font sizes I believe.
A little out of my depth here.
#4
1. how to converse em to px and vice versa ? 2. How to create a background
measured in em ?
The straight answer to both questions is "No". Assuming you indeed need this for web output, you have some serious reading up to do. Backgrounds can only be defined in percentages or absolute pixel values. The "em" measurement applies to any dynamically rendered page element that is able to inherit measurements - tables, text, divs, form controls and a few others, but not pixel images. However, even though it is used widespread, it is considered "bad style" as the output will look drastically different in every browser and severely may impair usability and accessibility (e.g. some elements could be rendered off-screen or become so small, they can't be clicked). Therefore any sizes should be entered in pixels, points or percentages, or, where it applies, in the old-style fixed size increments (small, big, +1, +2,-1,-2 and so on).
Mylenium
#5
Em should only be used for type and spacing (margin, border, and padding in CSS). Images should always be specified for the web in pixel measurements.
#6
"Images should always be specified for the web in pixel measurements."
Is there any other way to specify an image's size on the web? I don't know of any...
#7
Is there any other way to specify an image's size on the web? I don't know of any...
pixels or percent.
<
http://msdn.microsoft.com/en-us/library/ms535145(VS.85).aspx>
#8
"percent"
Ahhh...good point. I so rarely use percentage as a specifier, because I know it's smartest to optimize the size of any image to exactly what I want it to be before ever uploading it.
#9