473,661 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is base for em value in margin's and padding's element?

oranoos3000
107 New Member
hi
1-what is base for em value in margin's and padding's element?
do width of the containing block is base or these are calculated the same percentage value for this propery?

2-how does interpret negative margin for an element that cause overlap that element with other element?

thanks alot for your help.
Nov 7 '10 #1
1 2123
Dormilich
8,658 Recognized Expert Moderator Expert
check the wikipedia article for what em means and also the external links that explains em in CSS context.

to summarise it: em is a relative unit that per se does not have a fixed value, but rather is calculated from the fixed default settings in your browser/CSS.
Nov 7 '10 #2

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

Similar topics

6
2712
by: Terry | last post by:
I'm real new at this, so this may be a basic question, but I want to get off on the right foot. I thought it would be reasonable to use the following on a page: body { margin: 3em; background-color: #666; border: red medium double; padding: 3em;
6
16064
by: Haines Brown | last post by:
I find that when I use list-style-image with galeon or mozilla, padding is inserted between the symbol image and the following list text, while under IE 5.0 it seems to be inserted before the image instead of after it. li.up { list-style-image: url(../bin/arrow.png); height: 1.4em; margin-left: -0.4em; }
18
2953
by: Toronto Web Designer | last post by:
I'm having trouble with the padding and margin properties. IE tends to be happier with the padding and Netscape with the margin property. So I tried this: <link href="netscape-styles.css" rel="stylesheet" type="text/css"> <style type="text/css"> @import url(ie-styles.css); </style>
17
2133
by: Mike | last post by:
I'm trying to create a page: Three sections (left, topright and bottomright), each with a heading and scrolling (overflow) content. The size of these sections should be based upon the size of the user's viewable area in their browser. I'm close... really close, but I'm confused over how to mix specific measurements with percentages. When I began, things were quite nice: (http://play.psmonopoly.com/autosize.html). A little clunky in...
39
3067
by: VidTheKid | last post by:
THE PROBLEM The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or for background image placement, the size of the element minus the size of the image. A SOLUTION There should be new %-like units defined in CSS to specify what the measurement is a percentage of. These take the form of the % sign and one or...
1
1357
by: Luciano A. Ferrer | last post by:
Hi, I am trying to achieve this simple layout http://img478.imageshack.us/my.php?image=boceto2ah.gif and I have problems with the navigation div (the numbers) btw, the right way its somthing like 1234 5678 at bottom of that line, not vertical like that image
3
2727
by: Stanley | last post by:
I create a button strip using an UL list: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>test page</title> <style type="text/css"> ul.buttonstrip { display: inline;
4
3011
by: Duncan Jones | last post by:
I'm almost certain there is no easy answer to this question, but I'd thought I'd just check.... *Ignoring* for a second why I want to do this, is there any way to specify that an element in a page should ignore all CSS properties that have been defined for it, and to adopt some form of browser default? Suppose I want to add a <tdelement to an *arbitrary* web page. I want this element to ignore any CSS directives that may already apply
0
1398
by: adminloozer | last post by:
Hello, I've some difficulities when using padding or margin to position an element (alone on page alongside other elements OR inside another parent element). Can I say usually I will use margin to position or create some room between parent elements and padding to position or create some room between a parent element and child elements like a header with its links bar, search div, image div... If someone can tell me when using margin...
5
5470
by: montybytes | last post by:
Hi there, Although, I have already placed this question in the HTML/CSS section, perhaps it might be worthwhile asking the question here as well. I have a JavaScript function which retrieves the left-position of an Element. This JavaScript functions works in FF and IE7 but does not work in IE6, In IE6 it retrieves the wrong offsetLeft value. Having investigated the problem I noticed it had something to do with the margin-left and position...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.