473,382 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Pixels Per Em

2
hi

i am website designer. i am always confuse with em in css. can u tell me that 1 em = how much pixel.
Expand|Select|Wrap|Line Numbers
  1. div.test {
  2.         width:10.2em;
  3.         position:absolute;
  4.         top:0;
  5.         font-size:11px;
  6.         padding-left:1%;
  7.         padding-right:1%;
  8.         margin-left:0;
  9.         margin-right:0;
  10. }
  11.  
can u describe me width in pixel. 10.2 em is how much in pixel?

thanks
bindi
Feb 21 '07 #1
3 7672
AricC
1,892 Expert 1GB
hi

i am website designer. i am always confuse with em in css. can u tell me that 1 em = how much pixel.
Expand|Select|Wrap|Line Numbers
  1. div.test {
  2.         width:10.2em;
  3.         position:absolute;
  4.         top:0;
  5.         font-size:11px;
  6.         padding-left:1%;
  7.         padding-right:1%;
  8.         margin-left:0;
  9.         margin-right:0;
  10. }
  11.  
can u describe me width in pixel. 10.2 em is how much in pixel?

thanks
bindi
Check out this article some I think you can find the answer you're looking for.
Feb 22 '07 #2
by default 1 em is equal to 16px but you can define size as u need in <body>

for example i need to fix 1 em is equal to 10px

body{

margin:0;
padding:0;
font-size:62.5%
}

16px's 62.5% is equals ti 10 px

so now it will b like E.g

div#heading{

margin-top:0.5%;
padding-top: 1em;
font-size:1.8em;
}

the above example shows that margin-top: 5px, padding-top:10px and font size 18px. i hope this will help you. let me know if you have other questions
email me qais@astutesol.com
Nov 13 '09 #3
drhowarddrfine
7,435 Expert 4TB
A couple days ago, I saw someone answer a question from 3 years ago.
Nov 13 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: baruch | last post by:
Hello! I'm using PHP Version 4.3.3RC5-dev with GD Version bundled (2.0.15 compatible) to generated some graphics based on mysql data and to my surprise when I use the GD function imageline($im,...
4
by: serdar c | last post by:
hi everyone, i am writing a program for my scool project and i need to count the number of black pixels in a white empty picture box.. in the old visual basic there was a really simple command...
6
by: Craig Parsons | last post by:
Folks, I have an image of a circle, which I am trying to straighten out into a flat line. I am essentially wanting to look at the image, and read a straight line from the centre, and then plot...
4
by: Ma Xiaoguang | last post by:
Dear ladies and gentlemen: How to access all the pixels of a bitmap with C#? I am working with Delphi before. In Delphi, you can use TBitmap.Scanline property to access all the pixels of a...
3
by: Chris Saunders | last post by:
I am fairly new to .Net and C# but am familiar with the Win32 API. I wish to set the pixels of the client area of a window one at a time with a specific color. I have so far discovered that...
2
by: keith | last post by:
The function return quite rough pixels. e.g. if you use Font: Verdana, Font style:Regular, Size:8 and type 60 upper case character C, the functuion returns pixels 478.3639, but actualy it...
12
by: Laphan | last post by:
Hi All Strange question this, but could somebody tell me what the old size=1, size=2 .... to size=7 font parameters are in pixels and points. I thought it was: size 1 = 7 pt size 2 = 14...
1
by: Nitzan Tomer | last post by:
hi everyone, i created a script that outputs an image (transparent with text) based on parameters passed by $_GET. everything in my application works with 'pixels' and since GD2 this function...
3
by: headware | last post by:
I have to create some vertical text for a web page that allows users to print to labels. We decided to do this by creating an <imgtag on the web page and having the src attribute point to another...
2
by: n3ts3cur3 | last post by:
I have an array of int pixels in my c# program and i want to convert it into an image. The problem is i am converting java source code for a program into equivalent c# code. In java the line reads...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.