thehung1724 — 2014-03-02T13:53:27-05:00 — #1
As @felgall said:
You should use one or the other for the text on your page and not try to mix them or your page will break.
em is intended for defining text size.
px is intended for defining border widths and image sizes.
Now i use em for text size and px for others. But i still confusing when using both em and px in my design. Example
Is above code ok? Hope everyone give me advice. Thank in advance.
ronpat — 2014-03-02T15:57:07-05:00 — #2
Yes, the above code is OK.
Choose ems when you want the size or space to change in concert with the user's font size preference.
Use px where you do not want the space to change if the user uses a different font size.
felgall — 2014-03-02T16:11:44-05:00 — #3
The effect of that code is that the distance below paragraphs before the next element starts will not vary with the font size.
If someone enlarges the font significantly the page will eventually end up with gaps between the paragraphs that are smaller than the gaps between the lines within a paragraph. You'd have to make the font size rather large before that happened though.
thehung1724 — 2014-03-02T22:57:43-05:00 — #4
thank you so much.
thehung1724 — 2014-03-02T22:58:38-05:00 — #5
Does your mean is line-height?