![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am styling my paragraphs as follows: p { color: #222020; font: normal 1.0em/1.5 Arial, 'Helvetica Neue', Helvetica, sans- serif; margin-bottom: 8px; text-indent: 1em; } What unit should I use for margin and text? px or em? For text size I always use "em" but for margin and padding should I use em when it relates to text and px otherwise? So in this case I should use both em for margin and text-indent? |
#3
| |||
| |||
|
|
For text size I always use "em" but for margin and padding should I use em when it relates to text and px otherwise? |
#4
| |||
| |||
|
|
Hello, I am styling my paragraphs as follows: p { color: #222020; font: normal 1.0em/1.5 Arial, 'Helvetica Neue', Helvetica, sans- serif; margin-bottom: 8px; text-indent: 1em; } What unit should I use for margin and text? px or em? For text size I always use "em" but for margin and padding should I use em when it relates to text and px otherwise? So in this case I should use both em for margin and text-indent? |
#5
| |||
| |||
|
|
shapper wrote: Hello, I am styling my paragraphs as follows: p { color: #222020; font: normal 1.0em/1.5 Arial, 'Helvetica Neue', Helvetica, sans- serif; margin-bottom: 8px; text-indent: 1em; } What unit should I use for margin and text? px or em? For text size I always use "em" but for margin and padding should I use em when it relates to text and px otherwise? So in this case I should use both em for margin and text-indent? There is a view that ex units should be used instead of em units. I have recently found that using ex instead of em fixed some cross-browser issues. See: http://kb.mozillazine.org/Em_units_versus_ex_units |
#6
| |||
| |||
|
|
In article <hbgha2$jj4$1 (AT) news (DOT) eternal-september.org>, C A Upsdell <cupsdell (AT) nospam (DOT) not> wrote: There is a view that ex units should be used instead of em units. I have recently found that using ex instead of em fixed some cross-browser issues. See: http://kb.mozillazine.org/Em_units_versus_ex_units It is all precious nonsense. It does not matter about small variations and if it concerns anyone, they are obsessing about the wrong things. In the url quoted: "At "normal" font sizes (the defaults on Windows systems, and possibly Linux and others), 1 em is 10.06667 pixels, and 1 ex is 6 pixels. Therefore, ex units are recommended over em units, since they are more easily converted into evenly-rounding pixel values. Though some relative values may scale cleanly to different font sizes, there is, once again, potential for rounding errors. Regardless, it's still safer and easier to calculate whole pixel values using ex units." |
#7
| |||
| |||
|
|
There is a view that ex units should be used instead of em units. I have recently found that using ex instead of em fixed some cross-browser issues. See: http://kb.mozillazine.org/Em_units_versus_ex_units It is all precious nonsense. It does not matter about small variations and if it concerns anyone, they are obsessing about the wrong things. |
#8
| |||
| |||
|
|
I was more interested in fixing the problem than in determining exactly why the switch to ex units worked, but my suspicion is this: In the CSS used to implement the dropdown menu, a mixture of em and ex units was used, |
#9
| |||
| |||
|
|
I am styling my paragraphs as follows: p { color: #222020; font: normal 1.0em/1.5 Arial, 'Helvetica Neue', Helvetica, sans- serif; margin-bottom: 8px; text-indent: 1em; } |
|
For text size I always use "em" but for margin and padding should I use em when it relates to text and px otherwise? |
#10
| |||
| |||
|
|
This is the same reasoning (or "reasoning") that convinces people |
![]() |
| Thread Tools | |
| Display Modes | |
| |